1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Hive.Contracts.Interfaces;
|
---|
6 | using HeuristicLab.Hive.Contracts.BusinessObjects;
|
---|
7 | using HeuristicLab.Hive.Server.Core.InternalInterfaces.DataAccess;
|
---|
8 | using System.Resources;
|
---|
9 | using System.Reflection;
|
---|
10 | using HeuristicLab.Hive.Contracts;
|
---|
11 |
|
---|
12 | namespace HeuristicLab.Hive.Server.Core {
|
---|
13 | class UserRoleManager: IUserRoleManager {
|
---|
14 |
|
---|
15 | List<User> users;
|
---|
16 | List<UserGroup> userGroups;
|
---|
17 |
|
---|
18 | IUserAdapter userAdapter;
|
---|
19 | ResourceManager rm;
|
---|
20 |
|
---|
21 | public UserRoleManager() {
|
---|
22 | userAdapter = ServiceLocator.GetUserAdapter();
|
---|
23 | rm = new ResourceManager("HiveServerMessages.resx", Assembly.GetExecutingAssembly());
|
---|
24 |
|
---|
25 | users = new List<User>();
|
---|
26 | userGroups = new List<UserGroup>();
|
---|
27 |
|
---|
28 | users.Add(new User { PermissionOwnerId = 1, Name = "Hugo", Password = "hUg0" });
|
---|
29 | users.Add(new User { PermissionOwnerId = 2, Name = "Seppl", Password = "seppl" });
|
---|
30 | users.Add(new User { PermissionOwnerId = 3, Name = "Greg", Password = "greg" });
|
---|
31 |
|
---|
32 | userGroups.Add(new UserGroup { UserGroupId = 1 });
|
---|
33 | userGroups.Add(new UserGroup { UserGroupId = 2 });
|
---|
34 | }
|
---|
35 |
|
---|
36 | #region IUserRoleManager Members
|
---|
37 |
|
---|
38 | public ResponseList<User> GetAllUsers() {
|
---|
39 | return null;
|
---|
40 | }
|
---|
41 |
|
---|
42 | public Response AddNewUser(User user) {
|
---|
43 | User dbUser = userAdapter.GetUserByName(user.Name);
|
---|
44 |
|
---|
45 | return null;
|
---|
46 | }
|
---|
47 |
|
---|
48 | public ResponseList<UserGroup> GetAllUserGroups() {
|
---|
49 | return null;
|
---|
50 | }
|
---|
51 |
|
---|
52 | public Response RemoveUser(long userId) {
|
---|
53 | return null;
|
---|
54 | }
|
---|
55 |
|
---|
56 | public Response AddNewUserGroup(UserGroup userGroup) {
|
---|
57 | return null;
|
---|
58 | }
|
---|
59 |
|
---|
60 | public Response RemoveUserGroup(long groupId) {
|
---|
61 | return null;
|
---|
62 | }
|
---|
63 |
|
---|
64 | public Response AddUserToGroup(long groupId, long userId) {
|
---|
65 | throw new NotImplementedException();
|
---|
66 | }
|
---|
67 |
|
---|
68 | public Response RemoveUserFromGroup(long groupId, long userId) {
|
---|
69 | throw new NotImplementedException();
|
---|
70 | }
|
---|
71 |
|
---|
72 | #endregion
|
---|
73 | }
|
---|
74 | }
|
---|