public static void AddObjectAuthorizationRules() { AuthorizationRules.AllowGet(typeof(ClassA), "ClassARole"); AuthorizationRules.AllowCreate(typeof(ClassA), "ClassARole"); AuthorizationRules.AllowEdit(typeof(ClassA), "ClassARole"); AuthorizationRules.AllowDelete(typeof(ClassA), "ClassARole"); }
public static void AddObjectAuthorizationRules() { string[] canWrite = new string[] { "AdminUser", "RegularUser" }; string[] canRead = new string[] { "AdminUser", "RegularUser", "ReadOnlyUser" }; string[] admin = new string[] { "AdminUser" }; AuthorizationRules.AllowCreate(typeof(Rank), admin); AuthorizationRules.AllowDelete(typeof(Rank), admin); AuthorizationRules.AllowEdit(typeof(Rank), canWrite); AuthorizationRules.AllowGet(typeof(Rank), canRead); }
public static void AddObjectAuthorizationRules() { string[] canRead = new string[] { "AdminUser", "RegularUser", "ReadOnlyUser" }; AuthorizationRules.AllowGet(typeof(Company), canRead); }