mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-10 00:02:56 +01:00
Apply review suggestions
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
19
MediaBrowser.Model/Entities/UserPermissions.cs
Normal file
19
MediaBrowser.Model/Entities/UserPermissions.cs
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user