diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-05-07 14:52:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-07 14:52:10 +0200 |
| commit | 62da4d0e5c05ae12c57bcbbacd73e792c70ae9ae (patch) | |
| tree | f48de8012d3bc1c36378f57f649679932db4fdd0 /MediaBrowser.Model | |
| parent | 41b667c1374794421a1f9d324ef5156609de8464 (diff) | |
| parent | 5c6339d8fd4b12237c6cb8eb9d115d59c9c27ddf (diff) | |
Merge pull request #2492 from Polpetta/fix-api-private-data-leak
Fix emby/user/public API leaking sensitive data
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Dto/PublicUserDto.cs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Dto/PublicUserDto.cs b/MediaBrowser.Model/Dto/PublicUserDto.cs new file mode 100644 index 0000000000..b6bfaf2e9b --- /dev/null +++ b/MediaBrowser.Model/Dto/PublicUserDto.cs @@ -0,0 +1,48 @@ +using System; + +namespace MediaBrowser.Model.Dto +{ + /// <summary> + /// Class PublicUserDto. Its goal is to show only public information about a user + /// </summary> + public class PublicUserDto : IItemDto + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Name { get; set; } + + /// <summary> + /// Gets or sets the primary image tag. + /// </summary> + /// <value>The primary image tag.</value> + public string PrimaryImageTag { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance has password. + /// </summary> + /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value> + public bool HasPassword { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance has configured password. + /// Note that in this case this method should not be here, but it is necessary when changing password at the + /// first login. + /// </summary> + /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value> + public bool HasConfiguredPassword { get; set; } + + /// <summary> + /// Gets or sets the primary image aspect ratio. + /// </summary> + /// <value>The primary image aspect ratio.</value> + public double? PrimaryImageAspectRatio { get; set; } + + /// <inheritdoc /> + public override string ToString() + { + return Name ?? base.ToString(); + } + } +} |
