- Timestamp:
- 06/25/10 23:34:51 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs
r3952 r3953 22 22 23 23 public override void CreateRole(string roleName) { 24 throw new NotImplementedException(); 24 CreateRole(roleName, false); 25 26 } 27 28 public virtual void CreateRole(String roleName, bool isPermission) { 29 Persistence.DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext(); 30 HeuristicLabRole role = new HeuristicLabRole(); 31 role.RoleName = roleName; 32 role.IsPermission = isPermission; 33 db.HeuristicLabRole.InsertOnSubmit(role); 34 db.SubmitChanges(); 25 35 } 26 36 … … 30 40 31 41 public override string[] FindUsersInRole(string roleName, string usernameToMatch) { 32 throw new NotImplementedException( );42 throw new NotImplementedException("not implemented"); 33 43 } 34 44 … … 75 85 Persistence.DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext(); 76 86 bool returnValue = (DatabaseUtil.createDataClassesDataContext().HeuristicLabRole.Count(r => r.RoleName == roleName) == 1); 77 db. Connection.Close();87 db.Dispose(); 78 88 return returnValue; 79 89
Note: See TracChangeset
for help on using the changeset viewer.