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
21namespace kcenon::pacs::security {
22
26struct 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
Role
User roles in the PACS system.
Definition role.h:25
Role definitions for RBAC.
Represents a user in the system.
Definition user.h:26
bool has_role(Role role) const
Check if user has a specific role.
Definition user.h:35
std::vector< Role > roles
Definition user.h:29