qswiki/handlers/handlerpagedelete.h

28 satır
563 B
C
Ham Normal Görünüm Geçmiş

2018-11-03 17:12:20 +01:00
#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