Free cookie consent management tool by TermsFeed Policy Generator

source: branches/ClientUserManagement/HeuristicLab.Services.UserManagement/3.3/IUserManagementService.cs @ 6800

Last change on this file since 6800 was 6800, checked in by ascheibe, 12 years ago

#1648 started working on user management service

File size: 2.5 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Net.Security;
25using System.ServiceModel;
26using HeuristicLab.Services.UserManagement.DataTransfer;
27
28namespace HeuristicLab.Services.UserManagement {
29  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
30  public interface IUserManagementService {
31    #region User
32    [OperationContract]
33    User GetUser(Guid id);
34
35    [OperationContract]
36    IEnumerable<User> GetUsers();
37
38    [OperationContract]
39    IEnumerable<User> GetUsersForApplication(Guid applicationId);
40
41    [OperationContract]
42    Guid AddUser(User user);
43
44    [OperationContract]
45    void DeleteUser(Guid id);
46
47    [OperationContract]
48    void UpdateUser(User user);
49
50    [OperationContract]
51    void SetRoleForUser(Guid roleId, Guid userId);
52
53    [OperationContract]
54    IEnumerable<User> GetUsersWithRole(Guid roleId);
55
56    [OperationContract]
57    void RemoveRoleFromUser(Guid roleId, Guid userId);
58
59    [OperationContract]
60    bool HasUserRole(Guid userId, Guid roleId);
61
62    [OperationContract]
63    User ResetPassword(string applicationName, string userName, string password);
64    #endregion
65
66    #region Role
67    [OperationContract]
68    Role GetRole(Guid id);
69
70    [OperationContract]
71    IEnumerable<Role> GetRoles();
72
73    [OperationContract]
74    IEnumerable<Role> GetRolesForApplication(Guid applicationId);
75
76    [OperationContract]
77    Guid AddRole(Role role);
78
79    [OperationContract]
80    void UpdateRole(Role role);
81
82    [OperationContract]
83    void DeleteRole(Guid id);
84
85    [OperationContract]
86    IEnumerable<Role> GetUserRoles(Guid userId);
87    #endregion
88  }
89}
Note: See TracBrowser for help on using the repository browser.