qswiki/handlers/handlerpagedelete.h

27 行
560 B
C
Raw 通常表示 履歴

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