Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
 public static IPermissionPolicyRole GetDefaultRole(this IObjectSpace objectSpace) => objectSpace.GetDefaultRole("Default");
Exemplo n.º 6
0
 public static SecuritySystemRoleBase GetDefaultRole(this IObjectSpace objectSpace)
 {
     return(objectSpace.GetDefaultRole("Default"));
 }
 public static ISecurityRole GetDefaultRole(this IObjectSpace objectSpace)
 {
     return(objectSpace.GetDefaultRole("Default"));
 }