RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
UserRoles.h
1 /*
2  * ======================================================================
3  * Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
4  * Licensed under the MIT License.
5  * See LICENSE.md in the project root for license information.
6  * ======================================================================
7  */
8 
9 #ifndef USERROLES
10 #define USERROLES
11 #include <vector>
12 #include <string>
13 #include "ModernAPIExport.h"
14 
15 namespace rmscore {
16 namespace modernapi {
17 typedef std::vector<std::string>UserList;
18 typedef std::vector<std::string>RoleList;
19 
23 class DLL_PUBLIC_RMS UserRoles {
24 public:
25 
29  UserRoles(const UserList& users,
30  const RoleList& roles);
31 
35  const UserList& Users() const
36  {
37  return this->users;
38  }
39 
43  const RoleList& Roles() const
44  {
45  return this->roles;
46  }
47 
48 private:
49 
50  UserList users;
51  RoleList roles;
52 
53 private:
54 
55  void ValidateUsers(const UserList& users);
56  void ValidateRoles(const RoleList& roles);
57 };
58 } // namespace modernapi
59 } // namespace rmscore
60 
61 
62 #endif // USERROLES
Provides for the mapping of roles and users.
Definition: UserRoles.h:23
Definition: AuthenticationCallbackImpl.h:16
const RoleList & Roles() const
Roles of the users.
Definition: UserRoles.h:43
const UserList & Users() const
Users to whom the rights are granted.
Definition: UserRoles.h:35