Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs @ 898

Last change on this file since 898 was 845, checked in by svonolfe, 16 years ago

Added user adapter (#372).

File size: 1.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Hive.Contracts.Interfaces;
6using HeuristicLab.Hive.Contracts.BusinessObjects;
7
8namespace HeuristicLab.Hive.Server.Core {
9  class UserRoleManager: IUserRoleManager {
10
11    List<User> users;
12    List<UserGroup> userGroups;
13
14    public UserRoleManager() {
15      users = new List<User>();
16      userGroups = new List<UserGroup>();
17
18      users.Add(new User { PermissionOwnerId = 1, Name = "Hugo", Password = "hUg0" });
19      users.Add(new User { PermissionOwnerId = 2, Name = "Seppl", Password = "seppl" });
20      users.Add(new User { PermissionOwnerId = 3, Name = "Greg", Password = "greg" });
21
22      userGroups.Add(new UserGroup { UserGroupId = 1 });
23      userGroups.Add(new UserGroup { UserGroupId = 2 });
24    }
25
26    #region IUserRoleManager Members
27
28    public List<User> GetAllUsers() {
29      return users;     
30    }
31
32    public void AddNewUser(User user) {
33
34    }
35
36    public List<UserGroup> GetAllUserGroups() {
37      return userGroups;
38    }
39
40    #endregion
41  }
42}
Note: See TracBrowser for help on using the repository browser.