Added a new web_modules folder and moved every web related module to it.

This commit is contained in:
Relintai 2022-02-05 15:03:23 +01:00
parent 8981e8e688
commit 92e3f8a006
54 changed files with 12 additions and 11 deletions

View File

@ -226,6 +226,7 @@ if env_base["databases"]:
modfol = env_base["module_folders"].split(";")
modfol.append("modules")
modfol.append("web_modules")
#temporarily, these should be handled in a different pass
modfol.append("backends")
module_folders = list()

View File

@ -35,14 +35,14 @@ void WebRoot::setup_middleware() {
// --- UserSessionSetupMiddleware ---
// This one looks up users based on sessions
// (#include "modules/users/user_controller.h")
// (#include "web_modules/users/user_controller.h")
// _middlewares.push_back(Ref<UserSessionSetupMiddleware>(new UserSessionSetupMiddleware()));
// --- RBACUserSessionSetupMiddleware / RBACDefaultUserSessionSetupMiddleware ---
// Same as the previous, but if you want the RBAC system to work use one of these
// UserSessionSetupMiddleware is not needed if you need these
// (#include "modules/rbac_users/rbac_user_controller.h")
// (#include "web_modules/rbac_users/rbac_user_controller.h")
// _middlewares.push_back(Ref<RBACUserSessionSetupMiddleware>(new RBACUserSessionSetupMiddleware()));
// _middlewares.push_back(Ref<RBACDefaultUserSessionSetupMiddleware>(new RBACDefaultUserSessionSetupMiddleware()));

0
modules/.gitkeep Normal file
View File

View File

@ -5,8 +5,8 @@
#include "core/http/web_node.h"
#include "modules/list_page/list_page.h"
#include "modules/paged_article/paged_article.h"
#include "web_modules/list_page/list_page.h"
#include "web_modules/paged_article/paged_article.h"
// Inherit from PagedArticles and override generate_index_page -> load and process md files in the set folder
// SHould probably be called something else. PagedArticlesMDIndex ?

View File

@ -9,7 +9,7 @@
#include "core/http/request.h"
#include "core/http/session_manager.h"
#include "rbac_default_permissions.h"
#include "modules/users/user.h"
#include "web_modules/users/user.h"
#include "core/database/database.h"
#include "core/database/database_manager.h"

View File

@ -3,7 +3,7 @@
#include <map>
#include "modules/admin_panel/admin_node.h"
#include "web_modules/admin_panel/admin_node.h"
#include "core/containers/vector.h"
#include "core/string.h"

View File

@ -3,8 +3,8 @@
#include "core/string.h"
#include "modules/users/user.h"
#include "modules/rbac/rbac_rank.h"
#include "web_modules/users/user.h"
#include "web_modules/rbac/rbac_rank.h"
class Request;
class FormValidator;

View File

@ -3,8 +3,8 @@
#include "core/http/http_session.h"
#include "core/http/request.h"
#include "modules/rbac/rbac_controller.h"
#include "modules/rbac/rbac_default_permissions.h"
#include "web_modules/rbac/rbac_controller.h"
#include "web_modules/rbac/rbac_default_permissions.h"
#include "rbac_user.h"
Ref<User> RBACUserController::db_get_user(const int id) {

View File

@ -1,7 +1,7 @@
#ifndef RBAC_USER_CONTROLLER_H
#define RBAC_USER_CONTROLLER_H
#include "modules/users/user_controller.h"
#include "web_modules/users/user_controller.h"
#include "core/http/middleware.h"