Changeset 1738 for trunk/sources/HeuristicLab.Security.Contracts
- Timestamp:
- 05/05/09 14:55:10 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Security.Contracts/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Security.Contracts/3.2/BusinessObjects/User.cs
r1737 r1738 30 30 [DataContract] 31 31 public class User : PermissionOwner { 32 33 [DataMember] 34 public String Login { get; set; } 35 36 private String password; 37 38 [DataMember] 39 public String Password { 40 get { 41 return this.password; 42 } 43 protected set { 44 this.password = value; 45 } 46 } 47 48 [DataMember] 49 public String MailAddress { get; set; } 50 51 public void SetPlainPassword(String password) { 52 this.password = password; 53 } 54 55 public void SetHashedPassword(String password) { 56 this.password = getMd5Hash(password); 57 } 58 32 59 private static string getMd5Hash(string input) { 33 60 // Create a new instance of the MD5CryptoServiceProvider object. … … 50 77 return sBuilder.ToString(); 51 78 } 52 53 54 [DataMember]55 public String Login { get; set; }56 57 private String password;58 59 [DataMember]60 public String Password {61 get {62 return this.password;63 }64 set {65 this.password = getMd5Hash(value);66 }67 }68 69 public void SetPlainPassword(String password) {70 this.password = password;71 }72 73 [DataMember]74 public String MailAddress { get; set; }75 79 } 76 80 } -
trunk/sources/HeuristicLab.Security.Contracts/3.2/Interfaces/IPermissionManager.cs
r1737 r1738 10 10 11 11 [OperationContract] 12 [FaultContractAttribute(typeof(CommunicationException))] 12 13 Guid Authenticate(String userName, String password); 13 14 14 15 [OperationContract] 16 [FaultContractAttribute(typeof(CommunicationException))] 15 17 bool CheckPermission(Guid sessionId, Guid permissionId, 16 18 Guid enitityId); 17 19 18 20 [OperationContract] 21 [FaultContractAttribute(typeof(CommunicationException))] 19 22 void EndSession(Guid sessionId); 20 23 -
trunk/sources/HeuristicLab.Security.Contracts/3.2/Interfaces/ISecurityManager.cs
r1729 r1738 11 11 12 12 [OperationContract] 13 [FaultContractAttribute(typeof(CommunicationException))] 13 14 Permission AddPermission(Permission permission); 14 15 15 16 [OperationContract] 17 [FaultContractAttribute(typeof(CommunicationException))] 16 18 bool RemovePermission(Guid permissionId); 17 19 18 20 [OperationContract] 21 [FaultContractAttribute(typeof(CommunicationException))] 19 22 Permission UpdatePermission(Permission permission); 20 23 21 24 [OperationContract] 25 [FaultContractAttribute(typeof(CommunicationException))] 22 26 User AddNewUser(User user); 23 27 24 28 [OperationContract] 29 [FaultContractAttribute(typeof(CommunicationException))] 25 30 bool RemoveUser(Guid userId); 26 31 27 32 [OperationContract] 33 [FaultContractAttribute(typeof(CommunicationException))] 28 34 User UpdateUser(User user); 29 35 30 36 [OperationContract] 37 [FaultContractAttribute(typeof(CommunicationException))] 31 38 ICollection<User> GetAllUsers(); 32 39 33 40 [OperationContract] 41 [FaultContractAttribute(typeof(CommunicationException))] 34 42 User GetUserByName(string name); 35 43 36 44 [OperationContract] 45 [FaultContractAttribute(typeof(CommunicationException))] 37 46 UserGroup AddNewUserGroup(UserGroup group); 38 47 39 48 [OperationContract] 49 [FaultContractAttribute(typeof(CommunicationException))] 40 50 bool RemoveUserGroup(Guid userGroupId); 41 51 42 52 [OperationContract] 53 [FaultContractAttribute(typeof(CommunicationException))] 43 54 UserGroup UpdateUserGroup(UserGroup group); 44 55 45 56 [OperationContract] 57 [FaultContractAttribute(typeof(CommunicationException))] 46 58 ICollection<UserGroup> GetAllUserGroups(); 47 59 48 60 [OperationContract] 61 [FaultContractAttribute(typeof(CommunicationException))] 49 62 UserGroup GetUserGroupByName(string name); 50 63 51 64 [OperationContract] 65 [FaultContractAttribute(typeof(CommunicationException))] 52 66 PermissionOwner UpdatePermissionOwner(PermissionOwner permissionOwner); 53 67 54 68 [OperationContract] 69 [FaultContractAttribute(typeof(CommunicationException))] 55 70 bool AddPermissionOwnerToGroup(Guid userGroupId, Guid permissionOwnerId); 56 71 57 72 [OperationContract] 73 [FaultContractAttribute(typeof(CommunicationException))] 58 74 bool RemovePermissionOwnerFromGroup(Guid userGroupId, Guid permissionOwnerId); 59 75 60 76 [OperationContract] 77 [FaultContractAttribute(typeof(CommunicationException))] 61 78 bool GrantPermission(Guid permissionOwnerId, Guid permissionId, Guid entityId); 62 79 63 80 [OperationContract] 81 [FaultContractAttribute(typeof(CommunicationException))] 64 82 Permission GetPermissionById(Guid permissionId); 65 83 66 84 [OperationContract] 85 [FaultContractAttribute(typeof(CommunicationException))] 67 86 bool RevokePermission(Guid permissionOwnerId, Guid permissionId, Guid entityId); 68 87 }
Note: See TracChangeset
for help on using the changeset viewer.