Exemplo n.º 1
0
        public void AddUserToRole(ClientGenericObject user, ClientAdminUnit unit, ClientAUSchemaRole role)
        {
            user.NullCheck("user"); unit.NullCheck("unit"); role.NullCheck("role");
            CheckIDProvided(user); CheckIDProvided(unit); CheckIDProvided(role);

            if (string.IsNullOrEmpty(user.ID))
            {
                throw new ArgumentException("user的ID必须不为null", "user");
            }

            SCUser scUser = new SCUser()
            {
                ID       = user.ID,
                Name     = user.Properties.GetValue("Name", string.Empty),
                CodeName = user.Properties.GetValue("CodeName", string.Empty)
            };

            this.Facade.AddUserToRole(scUser, (AdminUnit)unit.ToSchemaObject(), (AUSchemaRole)role.ToSchemaObject());
        }
		public void UpdateAdminSchemaRole(ClientAUSchemaRole role)
		{
			this.Invoke("UpdateAdminSchemaRole", new object[] { role });
		}
		public void ReplaceUsersInRole(ClientGenericObject[] users, ClientAdminUnit unit, ClientAUSchemaRole role)
		{
			this.Invoke("ReplaceUsersInRole", new object[] { users, unit, role });
		}
		public void RemoveUserFromRole(ClientGenericObject user, ClientAdminUnit unit, ClientAUSchemaRole role)
		{
			this.Invoke("RemoveUserFromRole", new object[] { user, unit, role });
		}
		public void AddUserToRole(ClientGenericObject user, ClientAdminUnit unit, ClientAUSchemaRole role)
		{
			this.Invoke("AddUserToRole", new object[] { user, unit, role });
		}
		public void AddAdminSchemaRole(ClientAUSchemaRole role, ClientAUSchema schema)
		{
			this.Invoke("AddAdminSchemaRole", new object[] { role, schema });
		}
Exemplo n.º 7
0
 public void UpdateAdminSchemaRole(ClientAUSchemaRole role)
 {
     this.Invoke("UpdateAdminSchemaRole", new object[] { role });
 }
Exemplo n.º 8
0
 public void ReplaceUsersInRole(ClientGenericObject[] users, ClientAdminUnit unit, ClientAUSchemaRole role)
 {
     this.Invoke("ReplaceUsersInRole", new object[] { users, unit, role });
 }
Exemplo n.º 9
0
 public void RemoveUserFromRole(ClientGenericObject user, ClientAdminUnit unit, ClientAUSchemaRole role)
 {
     this.Invoke("RemoveUserFromRole", new object[] { user, unit, role });
 }
Exemplo n.º 10
0
 public void AddUserToRole(ClientGenericObject user, ClientAdminUnit unit, ClientAUSchemaRole role)
 {
     this.Invoke("AddUserToRole", new object[] { user, unit, role });
 }
Exemplo n.º 11
0
 public void AddAdminSchemaRole(ClientAUSchemaRole role, ClientAUSchema schema)
 {
     this.Invoke("AddAdminSchemaRole", new object[] { role, schema });
 }
Exemplo n.º 12
0
        public void ReplaceUsersInRole(ClientGenericObject[] users, ClientAdminUnit unit, ClientAUSchemaRole role)
        {
            users.NullCheck("users"); unit.NullCheck("unit"); role.NullCheck("role");
            CheckIDProvided(unit); CheckIDProvided(role);
            SCUser[] scUsers = new SCUser[users.Length];
            for (int i = users.Length - 1; i >= 0; i--)
            {
                scUsers[i] = (SCUser)users[i].ToSchemaObject();
            }

            this.Facade.ReplaceUsersInRole(scUsers, (AdminUnit)unit.ToSchemaObject(), (AUSchemaRole)role.ToSchemaObject());
        }
Exemplo n.º 13
0
        public void RemoveUserFromRole(ClientGenericObject user, ClientAdminUnit unit, ClientAUSchemaRole role)
        {
            user.NullCheck("user"); unit.NullCheck("unit"); role.NullCheck("role");
            CheckIDProvided(user); CheckIDProvided(unit); CheckIDProvided(role);

            SCUser scUser = new SCUser()
            {
                ID       = user.ID,
                Name     = user.Properties.GetValue("Name", string.Empty),
                CodeName = user.Properties.GetValue("CodeName", string.Empty)
            };

            this.Facade.RemoveUserFromRole(scUser, (AdminUnit)unit.ToSchemaObject(), (AUSchemaRole)role.ToSchemaObject());
        }
Exemplo n.º 14
0
 public void UpdateAdminSchemaRole(ClientAUSchemaRole role)
 {
     CheckIDProvided(role);
     this.Facade.UpdateAdminSchemaRole((AUSchemaRole)role.ToSchemaObject(true));
 }
Exemplo n.º 15
0
 public void AddAdminSchemaRole(ClientAUSchemaRole role, ClientAUSchema schema)
 {
     CheckIDProvided(schema);
     EnsureID(role);
     this.Facade.AddAdminSchemaRole((AUSchemaRole)role.ToSchemaObject(false), (AUSchema)schema.ToSchemaObject(true));
 }