- Timestamp:
- 06/26/10 08:13:12 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs
r3953 r3954 40 40 41 41 public override string[] FindUsersInRole(string roleName, string usernameToMatch) { 42 throw new NotImplementedException("not implemented"); 42 List<string> returnValue = new List<string>(); 43 Persistence.DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext(); 44 if (roleName != null && db.HeuristicLabRole.Count(r => r.RoleName == roleName) == 1) { 45 HeuristicLabRole role = db.HeuristicLabRole.Single(r => r.RoleName == roleName); 46 foreach(HeuristicLabUserRole userRole in role.HeuristicLabUserRole) 47 { 48 if (userRole.HeuristicLabUser.UserName.Contains(usernameToMatch)) { 49 returnValue.Add(userRole.HeuristicLabUser.UserName); 50 } 51 } 52 } 53 db.Dispose(); 54 return returnValue.ToArray(); 43 55 } 44 56
Note: See TracChangeset
for help on using the changeset viewer.