PACS System
0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
user.h
Go to the documentation of this file.
1
// BSD 3-Clause License
2
// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3
// See the LICENSE file in the project root for full license information.
4
14
#pragma once
15
16
#include "
role.h
"
17
#include <algorithm>
18
#include <string>
19
#include <vector>
20
21
namespace
kcenon::pacs::security
{
22
26
struct
User
{
27
std::string
id
;
28
std::string
username
;
29
std::vector<Role>
roles
;
30
bool
active
{
true
};
31
35
bool
has_role
(
Role
role)
const
{
36
return
std::ranges::find(
roles
, role) !=
roles
.end();
37
}
38
};
39
40
}
// namespace kcenon::pacs::security
kcenon::pacs::security
Definition
access_control_manager.h:27
kcenon::pacs::security::Role
Role
User roles in the PACS system.
Definition
role.h:25
role.h
Role definitions for RBAC.
kcenon::pacs::security::User
Represents a user in the system.
Definition
user.h:26
kcenon::pacs::security::User::active
bool active
Definition
user.h:30
kcenon::pacs::security::User::id
std::string id
Definition
user.h:27
kcenon::pacs::security::User::has_role
bool has_role(Role role) const
Check if user has a specific role.
Definition
user.h:35
kcenon::pacs::security::User::roles
std::vector< Role > roles
Definition
user.h:29
kcenon::pacs::security::User::username
std::string username
Definition
user.h:28
include
kcenon
pacs
security
user.h
Generated by
1.12.0