Skip to content

Instantly share code, notes, and snippets.

@charlesj
Created February 13, 2012 16:54
Show Gist options
  • Save charlesj/1818225 to your computer and use it in GitHub Desktop.
Save charlesj/1818225 to your computer and use it in GitHub Desktop.
public interface IWebsitePermission
{
//whether or not this permission has some value to check against
bool HasOption { get; }
//this is the function that will actually conduct the authorize
bool Check(User user, ActionExecutingContext context);
//the value to check against
string Option { get; set; }
//this is for UI / organization purposes
string Description { get; }
//The name to be used by the system for the permissions
string Name { get; }
//what the option actually does
string OptionDescription { get; }
//this is used by the UI to make permission assignment a little more straight forward.
List<PermissionDropDown> DropDown { get; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment