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"; public static readonly ImmutableArray ValidRoles = ImmutableArray.Create(AdminRole, PlebRole, DownloadRole, ChangePasswordRole, BookmarkRole, ChangeRestrictionRole, LoginRole); }