Exemple #1
0
 public void Grant(User user, RoleViewModel view)
 {
     Grant(user, Read(view.Id));
 }
Exemple #2
0
        public void Update(RoleViewModel view)
        {
            if (view == null) return;

            var role = Read(view.Id);

            if (role == null) return;

            if (RoleSpecification.IsValidName(view.Name))
            {
                role.Name = view.Name;
            }

            Update(role);

            // TODO: update attached users
        }
Exemple #3
0
 /* CRUD */
 public Role Create(RoleViewModel view)
 {
     return view == null ? null : Create(view.Name);
 }
Exemple #4
0
 public void Revoke(User user, RoleViewModel view)
 {
     Revoke(user, Read(view.Id));
 }