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