- Timestamp:
- 04/12/16 15:28:19 (9 years ago)
- Location:
- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/AccessAdministrationClient.cs
r13742 r13754 251 251 CallAccessService(s => s.UpdateUser(u)); 252 252 } 253 public List<Role> getRoles(User u) 254 { 255 return CallAccessService(s => s.GetUserRoles(u)); 256 } 257 public void addRoleToUser(User u, Role r) 258 { 259 CallAccessService(s => s.AddUserToRole(r, u)); 260 } 261 public void deleteUserRole(User u, Role r) 262 { 263 CallAccessService(s => s.RemoveUserFromRole(r, u)); 264 } 253 265 #endregion 254 266 … … 331 343 } 332 344 #endregion 345 346 #region Roles 347 public Role addRole(Access.Role r) 348 { 349 return CallAccessService(s => s.AddRole(r)); 350 } 351 public void deleteRole(string name) 352 { 353 Role r = Roles.Find(x => x.Name == name); 354 CallAccessService(s => s.DeleteRole(r)); 355 } 356 357 public List<UserGroupBase> getEnrolled(Role r) 358 { 359 var enroll = new List<UserGroupBase>(); 360 RefreshUsers(); 361 foreach(var us in users) 362 { 363 var temp = CallAccessService(s => s.GetUserRoles(us)); 364 if (temp.Contains(r)) 365 enroll.Add(us); 366 } 367 368 return enroll; 369 } 370 #endregion 371 333 372 334 373 #region Helpers
Note: See TracChangeset
for help on using the changeset viewer.