コード例 #1
0
 public static void AddObjectAuthorizationRules()
 {
     AuthorizationRules.AllowGet(typeof(ClassA), "ClassARole");
     AuthorizationRules.AllowCreate(typeof(ClassA), "ClassARole");
     AuthorizationRules.AllowEdit(typeof(ClassA), "ClassARole");
     AuthorizationRules.AllowDelete(typeof(ClassA), "ClassARole");
 }
コード例 #2
0
ファイル: Rank.cs プロジェクト: zuiwanting/csla
 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);
 }
コード例 #3
0
 public static void AddObjectAuthorizationRules()
 {
     string[] canRead = new string[] { "AdminUser", "RegularUser", "ReadOnlyUser" };
     AuthorizationRules.AllowGet(typeof(Company), canRead);
 }