Free cookie consent management tool by TermsFeed Policy Generator

Changeset 947


Ignore:
Timestamp:
12/10/08 15:00:52 (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

    r945 r947  
    2020    public static string RESPONSE_USERROLE_GET_ALL_USERGROUPS = "UserRole.AllUserGroupsReturned";
    2121    public static string RESPONSE_USERROLE_ID_MUST_NOT_BE_SET = "UserRole.IdMustNotBeSet";
     22    public static string RESPONSE_USERROLE_USERGROUP_ADDED_TO_USERGROUP = "UserRole.UserGroupAddedToUserGroup";
    2223
    2324    public static string RESPONSE_CLIENT_GET_ALL_CLIENTS = "Client.GetAllClients";
     
    3738    public static string RESPONSE_COMMUNICATOR_LOGIN_SUCCESS = "Communicator.LoginSuccess";
    3839    public static string RESPONSE_COMMUNICATOR_LOGOUT_CLIENT_NOT_REGISTERED = "Communicator.LogoutClientNotRegistered";
    39     public static string RESPONSE_COMMUNICATOR_LOGOUT_SUCCESS = "Logout.Success";
     40    public static string RESPONSE_COMMUNICATOR_LOGOUT_SUCCESS = "Communicator.LogoutSuccess";
    4041    public static string RESPONSE_COMMUNICATOR_NO_JOBS_LEFT = "Communicator.NoJobsLeft";
    4142
  • trunk/sources/HeuristicLab.Hive.Contracts/HiveServerMessages.resx

    r942 r947  
    142142    <value>You where logged out successfully. Good bye</value>
    143143  </data>
    144   <data name="Logout.UserAllreadyOnline" xml:space="preserve">
     144  <data name="Communicator.LogoutUserAllreadyOnline" xml:space="preserve">
    145145    <value>A User with this GUID is allready logged in</value>
    146146  </data>
  • trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs

    r945 r947  
    134134      Response response = new Response();
    135135
     136      UserGroup userGroup = userGroupAdapter.GetUserGroupById(groupId);
     137      UserGroup userGroupToAdd = userGroupAdapter.GetUserGroupById(groupToAddId);
     138
     139      if (userGroup == null || userGroupToAdd == null) {
     140        response.Success = false;
     141        response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_USERGROUP_DOESNT_EXIST;
     142        return response;
     143      }
     144      userGroup.Members.Add(userGroupToAdd);
     145      response.Success = true;
     146      response.StatusMessage = ApplicationConstants.RESPONSE_USERROLE_USERGROUP_ADDED_TO_USERGROUP;
     147
    136148      return response;
    137149    }
Note: See TracChangeset for help on using the changeset viewer.