Free cookie consent management tool by TermsFeed Policy Generator

Changeset 969


Ignore:
Timestamp:
12/11/08 16:22:37 (15 years ago)
Author:
msteinbi
Message:

Implementation of UserRoleManager (#417)

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs

    r967 r969  
    2121    public static string RESPONSE_USERROLE_ID_MUST_NOT_BE_SET = "UserRole.IdMustNotBeSet";
    2222    public static string RESPONSE_USERROLE_USERGROUP_ADDED_TO_USERGROUP = "UserRole.UserGroupAddedToUserGroup";
     23    public static string RESPONSE_USERROLE_USERNAME_EXISTS_ALLREADY = "UserRole.UsernameExistsAllready";
    2324
    2425    public static string RESPONSE_CLIENT_GET_ALL_CLIENTS = "Client.GetAllClients";
  • trunk/sources/HeuristicLab.Hive.Contracts/HiveServerMessages.resx

    r967 r969  
    214214    <value>The specified job doesn't exist</value>
    215215  </data>
     216  <data name="UserRole.UsernameExistsAllready" xml:space="preserve">
     217    <value>A user with this username exists allready</value>
     218  </data>
    216219</root>
  • trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs

    r952 r969  
    4343        return response;
    4444      }
     45      if (userAdapter.GetUserByName(user.Name) != null) {
     46        response.Success = false;
     47        response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_USERNAME_EXISTS_ALLREADY;
     48        return response;
     49      }
     50
    4551      userAdapter.UpdateUser(user);
    4652      response.Obj = user;
     
    8490        return response;
    8591      }
     92
    8693      userGroupAdapter.UpdateUserGroup(userGroup);
    8794      response.Obj = userGroup;
Note: See TracChangeset for help on using the changeset viewer.