28 rader
563 B
C++
28 rader
563 B
C++
#ifndef HANDLERPAGEDELETE_H
|
|
#define HANDLERPAGEDELETE_H
|
|
#include "handlerpage.h"
|
|
|
|
class HandlerPageDelete : public HandlerPage
|
|
{
|
|
bool pageMustExist() override
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool canAccess(std::string page) override
|
|
{
|
|
return this->userSession->user.permissions.canDelete();
|
|
}
|
|
|
|
std::string accessErrorMessage() override
|
|
{
|
|
return "You don't have permission to delete pages";
|
|
}
|
|
|
|
public:
|
|
Response handleRequest(PageDao &pageDao, std::string pagename, const Request &r) override;
|
|
using HandlerPage::HandlerPage;
|
|
};
|
|
|
|
#endif // HANDLERPAGEDELETE_H
|