diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2024-03-26 23:45:14 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2024-03-26 23:45:14 +0100 |
| commit | 56c432a8439e1b75c15729bfdb19d41d34e3124d (patch) | |
| tree | 00fa37a452a34363922f1b10ccefbec7f55ef81d /MediaBrowser.Model/Entities | |
| parent | f1dc1610a28fdb2dec4241d233503b6e11020546 (diff) | |
Apply review suggestions
Diffstat (limited to 'MediaBrowser.Model/Entities')
| -rw-r--r-- | MediaBrowser.Model/Entities/IHasShares.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/Share.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/UserPermissions.cs | 19 |
3 files changed, 21 insertions, 19 deletions
diff --git a/MediaBrowser.Model/Entities/IHasShares.cs b/MediaBrowser.Model/Entities/IHasShares.cs index 31574a3ff..fb6b6e424 100644 --- a/MediaBrowser.Model/Entities/IHasShares.cs +++ b/MediaBrowser.Model/Entities/IHasShares.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace MediaBrowser.Model.Entities; @@ -10,5 +10,5 @@ public interface IHasShares /// <summary> /// Gets or sets the shares. /// </summary> - IReadOnlyList<Share> Shares { get; set; } + IReadOnlyList<UserPermissions> Shares { get; set; } } diff --git a/MediaBrowser.Model/Entities/Share.cs b/MediaBrowser.Model/Entities/Share.cs deleted file mode 100644 index 186aad189..000000000 --- a/MediaBrowser.Model/Entities/Share.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace MediaBrowser.Model.Entities; - -/// <summary> -/// Class to hold data on sharing permissions. -/// </summary> -public class Share -{ - /// <summary> - /// Gets or sets the user id. - /// </summary> - public string? UserId { get; set; } - - /// <summary> - /// Gets or sets a value indicating whether the user has edit permissions. - /// </summary> - public bool CanEdit { get; set; } -} diff --git a/MediaBrowser.Model/Entities/UserPermissions.cs b/MediaBrowser.Model/Entities/UserPermissions.cs new file mode 100644 index 000000000..271feed11 --- /dev/null +++ b/MediaBrowser.Model/Entities/UserPermissions.cs @@ -0,0 +1,19 @@ +namespace MediaBrowser.Model.Entities; + +/// <summary> +/// Class to hold data on user permissions for lists. +/// </summary> +/// <param name="userId">The user id.</param> +/// <param name="canEdit">Edit permission.</param> +public class UserPermissions(string userId, bool canEdit = false) +{ + /// <summary> + /// Gets or sets the user id. + /// </summary> + public string UserId { get; set; } = userId; + + /// <summary> + /// Gets or sets a value indicating whether the user has edit permissions. + /// </summary> + public bool CanEdit { get; set; } = canEdit; +} |
