Let's make (git) history!
此提交包含在:
23
handlers/handlerpage.h
一般檔案
23
handlers/handlerpage.h
一般檔案
@@ -0,0 +1,23 @@
|
||||
#ifndef HANDLERPAGE_H
|
||||
#define HANDLERPAGE_H
|
||||
#include "handler.h"
|
||||
|
||||
class HandlerPage : public Handler
|
||||
{
|
||||
protected:
|
||||
virtual bool canAccess(std::string page) = 0;
|
||||
virtual bool pageMustExist();
|
||||
virtual std::string accessErrorMessage();
|
||||
|
||||
public:
|
||||
Response handle(const Request &r) override;
|
||||
virtual Response handleRequest(PageDao &pageDao, std::string pagename, const Request &r) = 0;
|
||||
~HandlerPage() override
|
||||
{
|
||||
}
|
||||
using Handler::Handler;
|
||||
|
||||
void setPageVars(TemplatePage &page, std::string pagename);
|
||||
};
|
||||
|
||||
#endif // HANDLERPAGE_H
|
||||
新增問題並參考
封鎖使用者