using System.Collections.Immutable;
namespace API.Constants;
///
/// Role-based Security
///
public static class PolicyConstants
{
///
/// Admin User. Has all privileges
///
public const string AdminRole = "Admin";
///
/// Non-Admin User. Must be granted privileges by an Admin.
///
public const string PlebRole = "Pleb";
///
/// Used to give a user ability to download files from the server
///
public const string DownloadRole = "Download";
///
/// Used to give a user ability to change their own password
///
public const string ChangePasswordRole = "Change Password";
///
/// Used to give a user ability to bookmark files on the server
///
public const string BookmarkRole = "Bookmark";
///
/// Used to give a user ability to Change Restrictions on their account
///
public const string ChangeRestrictionRole = "Change Restriction";
///
/// Used to give a user ability to Login to their account
///
public const string LoginRole = "Login";
///
/// Restricts the ability to manage their account without an admin
///
/// This is used explicitly for Demo Server. Not sure why it would be used in another fashion
public const string ReadOnlyRole = "Read Only";
///
/// Ability to promote entities (Collections, Reading Lists, etc).
///
public const string PromoteRole = "Promote";
public static readonly ImmutableArray ValidRoles =
ImmutableArray.Create(AdminRole, PlebRole, DownloadRole, ChangePasswordRole, BookmarkRole, ChangeRestrictionRole, LoginRole, ReadOnlyRole, PromoteRole);
}