Exemple #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();
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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();
        }