public static void InitializeSecurity(IObjectSpace objectSpace) { var defaultRole = objectSpace.GetDefaultRole(); var administratorRole = objectSpace.GetAdminRole("Administrator"); var modelRole = objectSpace.GetDefaultModelRole("ModelDifference"); objectSpace.GetUser("Admin", "Admin", administratorRole); objectSpace.GetUser("User", "", defaultRole, modelRole); objectSpace.CommitChanges(); }
public static void InitializeSecurity(IObjectSpace objectSpace) { var defaultRole = objectSpace.GetDefaultRole(); var administratorRole = objectSpace.GetAdminRole("Administrator"); var modelRole = objectSpace.GetDefaultModelRole("ModelDifference"); var user = objectSpace.GetUser("Admin", "Admin", administratorRole); UserFilterProvider.UpdaterUserKey = ((SecuritySystemUser)user).Oid; user = objectSpace.GetUser("User", "", defaultRole, modelRole); UserFilterProvider.UpdaterUserKey = ((SecuritySystemUser)user).Oid; objectSpace.CommitChanges(); }