From 92e3f8a006cc70bcd49bba11455b5c3d9fe7d196 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 5 Feb 2022 15:03:23 +0100 Subject: [PATCH] Added a new web_modules folder and moved every web related module to it. --- SConstruct | 1 + core/http/web_root.cpp | 4 ++-- modules/.gitkeep | 0 {modules => web_modules}/admin_panel/SCsub | 0 {modules => web_modules}/admin_panel/admin_node.cpp | 0 {modules => web_modules}/admin_panel/admin_node.h | 0 {modules => web_modules}/admin_panel/admin_panel.cpp | 0 {modules => web_modules}/admin_panel/admin_panel.h | 0 {modules => web_modules}/admin_panel/detect.py | 0 {modules => web_modules}/folder_pages/SCsub | 0 {modules => web_modules}/folder_pages/detect.py | 0 {modules => web_modules}/folder_pages/static_folder_page.cpp | 0 {modules => web_modules}/folder_pages/static_folder_page.h | 0 {modules => web_modules}/list_page/SCsub | 0 {modules => web_modules}/list_page/detect.py | 0 {modules => web_modules}/list_page/list_page.cpp | 0 {modules => web_modules}/list_page/list_page.h | 0 {modules => web_modules}/message_page/SCsub | 0 {modules => web_modules}/message_page/detect.py | 0 {modules => web_modules}/message_page/message_page.cpp | 0 {modules => web_modules}/message_page/message_page.h | 0 {modules => web_modules}/paged_article/SCsub | 0 {modules => web_modules}/paged_article/detect.py | 0 {modules => web_modules}/paged_article/paged_article.cpp | 0 {modules => web_modules}/paged_article/paged_article.h | 0 {modules => web_modules}/paged_article/paged_articles.cpp | 0 {modules => web_modules}/paged_article/paged_articles.h | 0 .../paged_article/paged_articles_md_index.cpp | 0 .../paged_article/paged_articles_md_index.h | 4 ++-- {modules => web_modules}/rbac/SCsub | 0 {modules => web_modules}/rbac/detect.py | 0 {modules => web_modules}/rbac/rbac_controller.cpp | 2 +- {modules => web_modules}/rbac/rbac_controller.h | 2 +- {modules => web_modules}/rbac/rbac_default_permissions.h | 0 {modules => web_modules}/rbac/rbac_permission.cpp | 0 {modules => web_modules}/rbac/rbac_permission.h | 0 {modules => web_modules}/rbac/rbac_rank.cpp | 0 {modules => web_modules}/rbac/rbac_rank.h | 0 {modules => web_modules}/rbac_users/SCsub | 0 {modules => web_modules}/rbac_users/detect.py | 0 {modules => web_modules}/rbac_users/rbac_user.cpp | 0 {modules => web_modules}/rbac_users/rbac_user.h | 4 ++-- {modules => web_modules}/rbac_users/rbac_user_controller.cpp | 4 ++-- {modules => web_modules}/rbac_users/rbac_user_controller.h | 2 +- {modules => web_modules}/static_pages/SCsub | 0 {modules => web_modules}/static_pages/detect.py | 0 {modules => web_modules}/static_pages/static_page.cpp | 0 {modules => web_modules}/static_pages/static_page.h | 0 {modules => web_modules}/users/SCsub | 0 {modules => web_modules}/users/detect.py | 0 {modules => web_modules}/users/user.cpp | 0 {modules => web_modules}/users/user.h | 0 {modules => web_modules}/users/user_controller.cpp | 0 {modules => web_modules}/users/user_controller.h | 0 54 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 modules/.gitkeep rename {modules => web_modules}/admin_panel/SCsub (100%) rename {modules => web_modules}/admin_panel/admin_node.cpp (100%) rename {modules => web_modules}/admin_panel/admin_node.h (100%) rename {modules => web_modules}/admin_panel/admin_panel.cpp (100%) rename {modules => web_modules}/admin_panel/admin_panel.h (100%) rename {modules => web_modules}/admin_panel/detect.py (100%) rename {modules => web_modules}/folder_pages/SCsub (100%) rename {modules => web_modules}/folder_pages/detect.py (100%) rename {modules => web_modules}/folder_pages/static_folder_page.cpp (100%) rename {modules => web_modules}/folder_pages/static_folder_page.h (100%) rename {modules => web_modules}/list_page/SCsub (100%) rename {modules => web_modules}/list_page/detect.py (100%) rename {modules => web_modules}/list_page/list_page.cpp (100%) rename {modules => web_modules}/list_page/list_page.h (100%) rename {modules => web_modules}/message_page/SCsub (100%) rename {modules => web_modules}/message_page/detect.py (100%) rename {modules => web_modules}/message_page/message_page.cpp (100%) rename {modules => web_modules}/message_page/message_page.h (100%) rename {modules => web_modules}/paged_article/SCsub (100%) rename {modules => web_modules}/paged_article/detect.py (100%) rename {modules => web_modules}/paged_article/paged_article.cpp (100%) rename {modules => web_modules}/paged_article/paged_article.h (100%) rename {modules => web_modules}/paged_article/paged_articles.cpp (100%) rename {modules => web_modules}/paged_article/paged_articles.h (100%) rename {modules => web_modules}/paged_article/paged_articles_md_index.cpp (100%) rename {modules => web_modules}/paged_article/paged_articles_md_index.h (86%) rename {modules => web_modules}/rbac/SCsub (100%) rename {modules => web_modules}/rbac/detect.py (100%) rename {modules => web_modules}/rbac/rbac_controller.cpp (99%) rename {modules => web_modules}/rbac/rbac_controller.h (98%) rename {modules => web_modules}/rbac/rbac_default_permissions.h (100%) rename {modules => web_modules}/rbac/rbac_permission.cpp (100%) rename {modules => web_modules}/rbac/rbac_permission.h (100%) rename {modules => web_modules}/rbac/rbac_rank.cpp (100%) rename {modules => web_modules}/rbac/rbac_rank.h (100%) rename {modules => web_modules}/rbac_users/SCsub (100%) rename {modules => web_modules}/rbac_users/detect.py (100%) rename {modules => web_modules}/rbac_users/rbac_user.cpp (100%) rename {modules => web_modules}/rbac_users/rbac_user.h (85%) rename {modules => web_modules}/rbac_users/rbac_user_controller.cpp (97%) rename {modules => web_modules}/rbac_users/rbac_user_controller.h (96%) rename {modules => web_modules}/static_pages/SCsub (100%) rename {modules => web_modules}/static_pages/detect.py (100%) rename {modules => web_modules}/static_pages/static_page.cpp (100%) rename {modules => web_modules}/static_pages/static_page.h (100%) rename {modules => web_modules}/users/SCsub (100%) rename {modules => web_modules}/users/detect.py (100%) rename {modules => web_modules}/users/user.cpp (100%) rename {modules => web_modules}/users/user.h (100%) rename {modules => web_modules}/users/user_controller.cpp (100%) rename {modules => web_modules}/users/user_controller.h (100%) diff --git a/SConstruct b/SConstruct index a25a6b1..7888e8d 100644 --- a/SConstruct +++ b/SConstruct @@ -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() diff --git a/core/http/web_root.cpp b/core/http/web_root.cpp index 523a7e6..f8f9b64 100644 --- a/core/http/web_root.cpp +++ b/core/http/web_root.cpp @@ -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(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(new RBACUserSessionSetupMiddleware())); // _middlewares.push_back(Ref(new RBACDefaultUserSessionSetupMiddleware())); diff --git a/modules/.gitkeep b/modules/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/modules/admin_panel/SCsub b/web_modules/admin_panel/SCsub similarity index 100% rename from modules/admin_panel/SCsub rename to web_modules/admin_panel/SCsub diff --git a/modules/admin_panel/admin_node.cpp b/web_modules/admin_panel/admin_node.cpp similarity index 100% rename from modules/admin_panel/admin_node.cpp rename to web_modules/admin_panel/admin_node.cpp diff --git a/modules/admin_panel/admin_node.h b/web_modules/admin_panel/admin_node.h similarity index 100% rename from modules/admin_panel/admin_node.h rename to web_modules/admin_panel/admin_node.h diff --git a/modules/admin_panel/admin_panel.cpp b/web_modules/admin_panel/admin_panel.cpp similarity index 100% rename from modules/admin_panel/admin_panel.cpp rename to web_modules/admin_panel/admin_panel.cpp diff --git a/modules/admin_panel/admin_panel.h b/web_modules/admin_panel/admin_panel.h similarity index 100% rename from modules/admin_panel/admin_panel.h rename to web_modules/admin_panel/admin_panel.h diff --git a/modules/admin_panel/detect.py b/web_modules/admin_panel/detect.py similarity index 100% rename from modules/admin_panel/detect.py rename to web_modules/admin_panel/detect.py diff --git a/modules/folder_pages/SCsub b/web_modules/folder_pages/SCsub similarity index 100% rename from modules/folder_pages/SCsub rename to web_modules/folder_pages/SCsub diff --git a/modules/folder_pages/detect.py b/web_modules/folder_pages/detect.py similarity index 100% rename from modules/folder_pages/detect.py rename to web_modules/folder_pages/detect.py diff --git a/modules/folder_pages/static_folder_page.cpp b/web_modules/folder_pages/static_folder_page.cpp similarity index 100% rename from modules/folder_pages/static_folder_page.cpp rename to web_modules/folder_pages/static_folder_page.cpp diff --git a/modules/folder_pages/static_folder_page.h b/web_modules/folder_pages/static_folder_page.h similarity index 100% rename from modules/folder_pages/static_folder_page.h rename to web_modules/folder_pages/static_folder_page.h diff --git a/modules/list_page/SCsub b/web_modules/list_page/SCsub similarity index 100% rename from modules/list_page/SCsub rename to web_modules/list_page/SCsub diff --git a/modules/list_page/detect.py b/web_modules/list_page/detect.py similarity index 100% rename from modules/list_page/detect.py rename to web_modules/list_page/detect.py diff --git a/modules/list_page/list_page.cpp b/web_modules/list_page/list_page.cpp similarity index 100% rename from modules/list_page/list_page.cpp rename to web_modules/list_page/list_page.cpp diff --git a/modules/list_page/list_page.h b/web_modules/list_page/list_page.h similarity index 100% rename from modules/list_page/list_page.h rename to web_modules/list_page/list_page.h diff --git a/modules/message_page/SCsub b/web_modules/message_page/SCsub similarity index 100% rename from modules/message_page/SCsub rename to web_modules/message_page/SCsub diff --git a/modules/message_page/detect.py b/web_modules/message_page/detect.py similarity index 100% rename from modules/message_page/detect.py rename to web_modules/message_page/detect.py diff --git a/modules/message_page/message_page.cpp b/web_modules/message_page/message_page.cpp similarity index 100% rename from modules/message_page/message_page.cpp rename to web_modules/message_page/message_page.cpp diff --git a/modules/message_page/message_page.h b/web_modules/message_page/message_page.h similarity index 100% rename from modules/message_page/message_page.h rename to web_modules/message_page/message_page.h diff --git a/modules/paged_article/SCsub b/web_modules/paged_article/SCsub similarity index 100% rename from modules/paged_article/SCsub rename to web_modules/paged_article/SCsub diff --git a/modules/paged_article/detect.py b/web_modules/paged_article/detect.py similarity index 100% rename from modules/paged_article/detect.py rename to web_modules/paged_article/detect.py diff --git a/modules/paged_article/paged_article.cpp b/web_modules/paged_article/paged_article.cpp similarity index 100% rename from modules/paged_article/paged_article.cpp rename to web_modules/paged_article/paged_article.cpp diff --git a/modules/paged_article/paged_article.h b/web_modules/paged_article/paged_article.h similarity index 100% rename from modules/paged_article/paged_article.h rename to web_modules/paged_article/paged_article.h diff --git a/modules/paged_article/paged_articles.cpp b/web_modules/paged_article/paged_articles.cpp similarity index 100% rename from modules/paged_article/paged_articles.cpp rename to web_modules/paged_article/paged_articles.cpp diff --git a/modules/paged_article/paged_articles.h b/web_modules/paged_article/paged_articles.h similarity index 100% rename from modules/paged_article/paged_articles.h rename to web_modules/paged_article/paged_articles.h diff --git a/modules/paged_article/paged_articles_md_index.cpp b/web_modules/paged_article/paged_articles_md_index.cpp similarity index 100% rename from modules/paged_article/paged_articles_md_index.cpp rename to web_modules/paged_article/paged_articles_md_index.cpp diff --git a/modules/paged_article/paged_articles_md_index.h b/web_modules/paged_article/paged_articles_md_index.h similarity index 86% rename from modules/paged_article/paged_articles_md_index.h rename to web_modules/paged_article/paged_articles_md_index.h index a5f2351..ebde828 100644 --- a/modules/paged_article/paged_articles_md_index.h +++ b/web_modules/paged_article/paged_articles_md_index.h @@ -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 ? diff --git a/modules/rbac/SCsub b/web_modules/rbac/SCsub similarity index 100% rename from modules/rbac/SCsub rename to web_modules/rbac/SCsub diff --git a/modules/rbac/detect.py b/web_modules/rbac/detect.py similarity index 100% rename from modules/rbac/detect.py rename to web_modules/rbac/detect.py diff --git a/modules/rbac/rbac_controller.cpp b/web_modules/rbac/rbac_controller.cpp similarity index 99% rename from modules/rbac/rbac_controller.cpp rename to web_modules/rbac/rbac_controller.cpp index 9f3e2d4..9107afa 100644 --- a/modules/rbac/rbac_controller.cpp +++ b/web_modules/rbac/rbac_controller.cpp @@ -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" diff --git a/modules/rbac/rbac_controller.h b/web_modules/rbac/rbac_controller.h similarity index 98% rename from modules/rbac/rbac_controller.h rename to web_modules/rbac/rbac_controller.h index 947cc3d..b155cfe 100644 --- a/modules/rbac/rbac_controller.h +++ b/web_modules/rbac/rbac_controller.h @@ -3,7 +3,7 @@ #include -#include "modules/admin_panel/admin_node.h" +#include "web_modules/admin_panel/admin_node.h" #include "core/containers/vector.h" #include "core/string.h" diff --git a/modules/rbac/rbac_default_permissions.h b/web_modules/rbac/rbac_default_permissions.h similarity index 100% rename from modules/rbac/rbac_default_permissions.h rename to web_modules/rbac/rbac_default_permissions.h diff --git a/modules/rbac/rbac_permission.cpp b/web_modules/rbac/rbac_permission.cpp similarity index 100% rename from modules/rbac/rbac_permission.cpp rename to web_modules/rbac/rbac_permission.cpp diff --git a/modules/rbac/rbac_permission.h b/web_modules/rbac/rbac_permission.h similarity index 100% rename from modules/rbac/rbac_permission.h rename to web_modules/rbac/rbac_permission.h diff --git a/modules/rbac/rbac_rank.cpp b/web_modules/rbac/rbac_rank.cpp similarity index 100% rename from modules/rbac/rbac_rank.cpp rename to web_modules/rbac/rbac_rank.cpp diff --git a/modules/rbac/rbac_rank.h b/web_modules/rbac/rbac_rank.h similarity index 100% rename from modules/rbac/rbac_rank.h rename to web_modules/rbac/rbac_rank.h diff --git a/modules/rbac_users/SCsub b/web_modules/rbac_users/SCsub similarity index 100% rename from modules/rbac_users/SCsub rename to web_modules/rbac_users/SCsub diff --git a/modules/rbac_users/detect.py b/web_modules/rbac_users/detect.py similarity index 100% rename from modules/rbac_users/detect.py rename to web_modules/rbac_users/detect.py diff --git a/modules/rbac_users/rbac_user.cpp b/web_modules/rbac_users/rbac_user.cpp similarity index 100% rename from modules/rbac_users/rbac_user.cpp rename to web_modules/rbac_users/rbac_user.cpp diff --git a/modules/rbac_users/rbac_user.h b/web_modules/rbac_users/rbac_user.h similarity index 85% rename from modules/rbac_users/rbac_user.h rename to web_modules/rbac_users/rbac_user.h index 203b943..f86acf1 100644 --- a/modules/rbac_users/rbac_user.h +++ b/web_modules/rbac_users/rbac_user.h @@ -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; diff --git a/modules/rbac_users/rbac_user_controller.cpp b/web_modules/rbac_users/rbac_user_controller.cpp similarity index 97% rename from modules/rbac_users/rbac_user_controller.cpp rename to web_modules/rbac_users/rbac_user_controller.cpp index b06e506..9611b59 100644 --- a/modules/rbac_users/rbac_user_controller.cpp +++ b/web_modules/rbac_users/rbac_user_controller.cpp @@ -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 RBACUserController::db_get_user(const int id) { diff --git a/modules/rbac_users/rbac_user_controller.h b/web_modules/rbac_users/rbac_user_controller.h similarity index 96% rename from modules/rbac_users/rbac_user_controller.h rename to web_modules/rbac_users/rbac_user_controller.h index 428eb15..044ba17 100644 --- a/modules/rbac_users/rbac_user_controller.h +++ b/web_modules/rbac_users/rbac_user_controller.h @@ -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" diff --git a/modules/static_pages/SCsub b/web_modules/static_pages/SCsub similarity index 100% rename from modules/static_pages/SCsub rename to web_modules/static_pages/SCsub diff --git a/modules/static_pages/detect.py b/web_modules/static_pages/detect.py similarity index 100% rename from modules/static_pages/detect.py rename to web_modules/static_pages/detect.py diff --git a/modules/static_pages/static_page.cpp b/web_modules/static_pages/static_page.cpp similarity index 100% rename from modules/static_pages/static_page.cpp rename to web_modules/static_pages/static_page.cpp diff --git a/modules/static_pages/static_page.h b/web_modules/static_pages/static_page.h similarity index 100% rename from modules/static_pages/static_page.h rename to web_modules/static_pages/static_page.h diff --git a/modules/users/SCsub b/web_modules/users/SCsub similarity index 100% rename from modules/users/SCsub rename to web_modules/users/SCsub diff --git a/modules/users/detect.py b/web_modules/users/detect.py similarity index 100% rename from modules/users/detect.py rename to web_modules/users/detect.py diff --git a/modules/users/user.cpp b/web_modules/users/user.cpp similarity index 100% rename from modules/users/user.cpp rename to web_modules/users/user.cpp diff --git a/modules/users/user.h b/web_modules/users/user.h similarity index 100% rename from modules/users/user.h rename to web_modules/users/user.h diff --git a/modules/users/user_controller.cpp b/web_modules/users/user_controller.cpp similarity index 100% rename from modules/users/user_controller.cpp rename to web_modules/users/user_controller.cpp diff --git a/modules/users/user_controller.h b/web_modules/users/user_controller.h similarity index 100% rename from modules/users/user_controller.h rename to web_modules/users/user_controller.h