Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/05/09 14:55:10 (16 years ago)
Author:
asimon
Message:

error correction (ticket #537)

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  
    3030  [DataContract]
    3131  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
    3259    private static string getMd5Hash(string input) {
    3360      // Create a new instance of the MD5CryptoServiceProvider object.
     
    5077      return sBuilder.ToString();
    5178    }
    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; }
    7579  }
    7680}
  • trunk/sources/HeuristicLab.Security.Contracts/3.2/Interfaces/IPermissionManager.cs

    r1737 r1738  
    1010
    1111    [OperationContract]
     12    [FaultContractAttribute(typeof(CommunicationException))]
    1213    Guid Authenticate(String userName, String password);
    1314
    1415    [OperationContract]
     16    [FaultContractAttribute(typeof(CommunicationException))]
    1517    bool CheckPermission(Guid sessionId, Guid permissionId,
    1618      Guid enitityId);
    1719
    1820    [OperationContract]
     21    [FaultContractAttribute(typeof(CommunicationException))]
    1922    void EndSession(Guid sessionId);
    2023
  • trunk/sources/HeuristicLab.Security.Contracts/3.2/Interfaces/ISecurityManager.cs

    r1729 r1738  
    1111
    1212    [OperationContract]
     13    [FaultContractAttribute(typeof(CommunicationException))]
    1314    Permission AddPermission(Permission permission);
    1415
    1516    [OperationContract]
     17    [FaultContractAttribute(typeof(CommunicationException))]
    1618    bool RemovePermission(Guid permissionId);
    1719
    1820    [OperationContract]
     21    [FaultContractAttribute(typeof(CommunicationException))]
    1922    Permission UpdatePermission(Permission permission);
    2023
    2124    [OperationContract]
     25    [FaultContractAttribute(typeof(CommunicationException))]
    2226    User AddNewUser(User user);
    2327
    2428    [OperationContract]
     29    [FaultContractAttribute(typeof(CommunicationException))]
    2530    bool RemoveUser(Guid userId);
    2631
    2732    [OperationContract]
     33    [FaultContractAttribute(typeof(CommunicationException))]
    2834    User UpdateUser(User user);
    2935
    3036    [OperationContract]
     37    [FaultContractAttribute(typeof(CommunicationException))]
    3138    ICollection<User> GetAllUsers();
    3239
    3340    [OperationContract]
     41    [FaultContractAttribute(typeof(CommunicationException))]
    3442    User GetUserByName(string name);
    3543
    3644    [OperationContract]
     45    [FaultContractAttribute(typeof(CommunicationException))]
    3746    UserGroup AddNewUserGroup(UserGroup group);
    3847
    3948    [OperationContract]
     49    [FaultContractAttribute(typeof(CommunicationException))]
    4050    bool RemoveUserGroup(Guid userGroupId);
    4151
    4252    [OperationContract]
     53    [FaultContractAttribute(typeof(CommunicationException))]
    4354    UserGroup UpdateUserGroup(UserGroup group);
    4455
    4556    [OperationContract]
     57    [FaultContractAttribute(typeof(CommunicationException))]
    4658    ICollection<UserGroup> GetAllUserGroups();
    4759
    4860    [OperationContract]
     61    [FaultContractAttribute(typeof(CommunicationException))]
    4962    UserGroup GetUserGroupByName(string name);
    5063
    5164    [OperationContract]
     65    [FaultContractAttribute(typeof(CommunicationException))]
    5266    PermissionOwner UpdatePermissionOwner(PermissionOwner permissionOwner);
    5367
    5468    [OperationContract]
     69    [FaultContractAttribute(typeof(CommunicationException))]
    5570    bool AddPermissionOwnerToGroup(Guid userGroupId, Guid permissionOwnerId);
    5671
    5772    [OperationContract]
     73    [FaultContractAttribute(typeof(CommunicationException))]
    5874    bool RemovePermissionOwnerFromGroup(Guid userGroupId, Guid permissionOwnerId);
    5975
    6076    [OperationContract]
     77    [FaultContractAttribute(typeof(CommunicationException))]
    6178    bool GrantPermission(Guid permissionOwnerId, Guid permissionId, Guid entityId);
    6279
    6380    [OperationContract]
     81    [FaultContractAttribute(typeof(CommunicationException))]
    6482    Permission GetPermissionById(Guid permissionId);
    6583
    6684    [OperationContract]
     85    [FaultContractAttribute(typeof(CommunicationException))]
    6786    bool RevokePermission(Guid permissionOwnerId, Guid permissionId, Guid entityId);
    6887  }
Note: See TracChangeset for help on using the changeset viewer.