handlers: permisison check for all pages + retrieve user-specific permissions for pages (if any)
This commit is contained in:
@@ -26,7 +26,12 @@ SOFTWARE.
|
||||
|
||||
bool HandlerPageView::canAccess(std::string page)
|
||||
{
|
||||
return this->userSession->user.permissions.canRead();
|
||||
return effectivePermissions(page).canRead();
|
||||
}
|
||||
|
||||
std::string HandlerPageView::accessErrorMessage()
|
||||
{
|
||||
return "You don't have permission to view this page";
|
||||
}
|
||||
|
||||
std::string HandlerPageView::createIndexContent(IParser &parser, std::string content)
|
||||
|
Verwijs in nieuw issue
Block a user