2021-10-31 21:45:12 +01:00
|
|
|
#include "rbac_controller.h"
|
|
|
|
|
|
|
|
#include "core/html/form_validator.h"
|
|
|
|
#include "core/html/html_builder.h"
|
|
|
|
#include "core/http/cookie.h"
|
|
|
|
#include "core/http/http_session.h"
|
|
|
|
#include "core/http/request.h"
|
|
|
|
#include "core/http/session_manager.h"
|
|
|
|
#include "rbac_model.h"
|
|
|
|
|
|
|
|
void RBACController::handle_request_main(Request *request) {
|
|
|
|
}
|
|
|
|
|
|
|
|
void RBACController::create_validators() {
|
|
|
|
}
|
|
|
|
|
2021-11-01 15:12:09 +01:00
|
|
|
void RBACController::admin_handle_request_main(Request *request) {
|
2021-11-01 16:39:30 +01:00
|
|
|
|
2021-11-01 15:12:09 +01:00
|
|
|
}
|
|
|
|
|
2021-11-01 01:39:55 +01:00
|
|
|
void RBACController::admin_add_section_links(Vector<AdminSectionLinkInfo> *links) {
|
2021-11-01 01:47:43 +01:00
|
|
|
links->push_back(AdminSectionLinkInfo("Test", "test"));
|
2021-11-01 01:39:55 +01:00
|
|
|
}
|
|
|
|
|
2021-11-01 16:39:30 +01:00
|
|
|
void RBACController::initialize() {
|
|
|
|
_permissions = RBACModel::get_singleton()->load_permissions();
|
|
|
|
}
|
|
|
|
|
2021-10-31 21:45:12 +01:00
|
|
|
RBACController *RBACController::get_singleton() {
|
|
|
|
return _self;
|
|
|
|
}
|
|
|
|
|
|
|
|
RBACController::RBACController() :
|
2021-10-31 23:12:05 +01:00
|
|
|
AdminController() {
|
2021-10-31 21:45:12 +01:00
|
|
|
|
|
|
|
if (_self) {
|
|
|
|
printf("RBACController::RBACController(): Error! self is not null!/n");
|
|
|
|
}
|
|
|
|
|
|
|
|
_self = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
RBACController::~RBACController() {
|
|
|
|
if (_self == this) {
|
|
|
|
_self = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RBACController *RBACController::_self = nullptr;
|