Added permission checks to all controllers. Added role permission loading. Added frontend permission checks. Implemented user logout in admin panel.
This commit was merged in pull request #4.
This commit is contained in:
@@ -5,16 +5,33 @@ public static class Permissions
|
||||
public const string Prefix = "Permissions:";
|
||||
public const string ClaimType = "Permissions";
|
||||
|
||||
public static class Admin
|
||||
public static class Users
|
||||
{
|
||||
public static class Users
|
||||
{
|
||||
private const string Section = "Users";
|
||||
private const string Section = "Users";
|
||||
|
||||
public const string View = $"{Prefix}{Section}.View";
|
||||
public const string Edit = $"{Prefix}{Section}.Edit";
|
||||
public const string Create = $"{Prefix}{Section}.Create";
|
||||
public const string Delete = $"{Prefix}{Section}.Delete";
|
||||
}
|
||||
public const string View = $"{Prefix}{Section}.{nameof(View)}";
|
||||
public const string Edit = $"{Prefix}{Section}.{nameof(Edit)}";
|
||||
public const string Create = $"{Prefix}{Section}.{nameof(Create)}";
|
||||
public const string Delete = $"{Prefix}{Section}.{nameof(Delete)}";
|
||||
public const string Logout = $"{Prefix}{Section}.{nameof(Logout)}";
|
||||
}
|
||||
|
||||
public static class Roles
|
||||
{
|
||||
private const string Section = "Roles";
|
||||
|
||||
public const string View = $"{Prefix}{Section}.{nameof(View)}";
|
||||
public const string Edit = $"{Prefix}{Section}.{nameof(Edit)}";
|
||||
public const string Create = $"{Prefix}{Section}.{nameof(Create)}";
|
||||
public const string Delete = $"{Prefix}{Section}.{nameof(Delete)}";
|
||||
public const string Members = $"{Prefix}{Section}.{nameof(Members)}";
|
||||
}
|
||||
|
||||
public static class System
|
||||
{
|
||||
private const string Section = "System";
|
||||
|
||||
public const string Info = $"{Prefix}{Section}.{nameof(Info)}";
|
||||
public const string Diagnose = $"{Prefix}{Section}.{nameof(Diagnose)}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user