Skip to content

Instantly share code, notes, and snippets.

@winsonet
Created November 9, 2019 04:04
Show Gist options
  • Save winsonet/eef65151f10c3633cd68d86a2ae2ece0 to your computer and use it in GitHub Desktop.
Save winsonet/eef65151f10c3633cd68d86a2ae2ece0 to your computer and use it in GitHub Desktop.
public class AclAttribute : AuthorizeAttribute
{
string _notAllowRoles;
string _allowActions;
/// <summary>
/// Set the ACL attribute for access right
/// </summary>
/// <param name="NotAllowRoles">Not allow roles, split with comma</param>
/// <param name="AllowActions">Set the actions allow for the restrict roles</param>
public AclAttribute(string NotAllowRoles, string AllowActions = null)
{
_notAllowRoles = NotAllowRoles;
_allowActions = AllowActions;
}
public AclAttribute() : base()
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment