2021-11-10 15:32:44 +01:00
|
|
|
#ifndef RBAC_USER_H
|
|
|
|
#define RBAC_USER_H
|
|
|
|
|
|
|
|
#include "core/string.h"
|
|
|
|
|
2022-02-05 15:03:23 +01:00
|
|
|
#include "web_modules/users/user.h"
|
|
|
|
#include "web_modules/rbac/rbac_rank.h"
|
2021-11-10 15:32:44 +01:00
|
|
|
|
|
|
|
class Request;
|
|
|
|
class FormValidator;
|
|
|
|
|
|
|
|
class RBACUser : public User {
|
|
|
|
RCPP_OBJECT(RBACUser, User);
|
|
|
|
|
|
|
|
public:
|
2021-11-10 19:35:02 +01:00
|
|
|
Ref<RBACRank> rbac_rank;
|
|
|
|
|
2022-01-06 11:34:53 +01:00
|
|
|
int get_permissions(Request *request);
|
2021-11-10 19:35:02 +01:00
|
|
|
bool has_permission(Request *request, const int permission);
|
2022-01-06 11:34:53 +01:00
|
|
|
int get_additional_permissions(Request *request);
|
|
|
|
bool has_additional_permission(Request *request, const int permission);
|
2021-11-10 19:35:02 +01:00
|
|
|
|
2021-11-10 15:32:44 +01:00
|
|
|
RBACUser();
|
|
|
|
~RBACUser();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|