From 0c30f5bed84b1b19807a2ea47a825846dcbcc56d Mon Sep 17 00:00:00 2001 From: Teus Benschop Date: Fri, 5 Jan 2024 18:45:06 +0100 Subject: [PATCH] Clearer types in code rather than void pointers https://github.com/bibledit/cloud/issues/926 --- access/logic.cpp | 1 + bb/book.cpp | 2 +- bb/chapter.cpp | 2 +- bb/css.cpp | 2 +- bb/import.cpp | 2 +- bb/manage.cpp | 2 +- bb/order.cpp | 2 +- bb/settings.cpp | 2 +- changes/change.cpp | 2 +- changes/changes.cpp | 2 +- changes/manage.cpp | 2 +- changes/statistics.cpp | 2 +- checks/index.cpp | 2 +- checks/settings.cpp | 2 +- checks/settingspairs.cpp | 2 +- checks/settingspatterns.cpp | 2 +- checks/settingssentences.cpp | 2 +- checks/suppress.cpp | 2 +- client/index.cpp | 2 +- collaboration/index.cpp | 2 +- collaboration/settings.cpp | 2 +- compare/index.cpp | 2 +- consistency/index.cpp | 2 +- consistency/input.cpp | 2 +- consistency/poll.cpp | 2 +- developer/index.cpp | 3 ++- edit/edit.cpp | 2 +- edit/id.cpp | 2 +- edit/index.cpp | 2 +- edit/load.cpp | 2 +- edit/navigate.cpp | 2 +- edit/position.cpp | 2 +- edit/preview.cpp | 2 +- edit/save.cpp | 2 +- edit/styles.cpp | 2 +- edit/update.cpp | 2 +- editone2/index.cpp | 2 +- editone2/load.cpp | 2 +- editone2/save.cpp | 2 +- editone2/update.cpp | 2 +- editone2/verse.cpp | 2 +- editor/id.cpp | 2 +- editor/select.cpp | 3 ++- editor/style.cpp | 2 +- editusfm/focus.cpp | 2 +- editusfm/index.cpp | 2 +- editusfm/load.cpp | 2 +- editusfm/offset.cpp | 2 +- editusfm/save.cpp | 2 +- email/index.cpp | 2 +- export/odt.cpp | 1 + filter/roles.cpp | 6 +++--- filter/roles.h | 5 +++-- help/index.cpp | 2 +- images/fetch.cpp | 2 +- images/index.cpp | 2 +- images/view.cpp | 2 +- index/index.cpp | 3 ++- index/listing.cpp | 4 ++-- jobs/index.cpp | 2 +- journal/index.cpp | 2 +- lexicon/definition.cpp | 2 +- manage/accounts.cpp | 2 +- manage/exports.cpp | 3 ++- manage/hyphenation.cpp | 3 ++- manage/index.cpp | 2 +- manage/privileges.cpp | 2 +- manage/users.cpp | 2 +- manage/write.cpp | 2 +- mapping/index.cpp | 2 +- mapping/map.cpp | 2 +- menu/index.cpp | 2 +- navigation/poll.cpp | 2 +- navigation/update.cpp | 2 +- nmt/index.cpp | 3 ++- notes/actions.cpp | 2 +- notes/assign-1.cpp | 2 +- notes/assign-n.cpp | 2 +- notes/bb-1.cpp | 2 +- notes/bb-n.cpp | 2 +- notes/bulk.cpp | 4 ++-- notes/click.cpp | 2 +- notes/edit.cpp | 2 +- notes/note.cpp | 2 +- notes/severity-1.cpp | 2 +- notes/severity-n.cpp | 2 +- notes/status-1.cpp | 2 +- notes/status-n.cpp | 2 +- notes/summary.cpp | 2 +- notes/unassign-n.cpp | 2 +- notes/verses.cpp | 2 +- paratext/index.cpp | 2 +- personalize/index.cpp | 4 ++-- public/chapter.cpp | 2 +- public/comment.cpp | 2 +- public/create.cpp | 2 +- public/index.cpp | 2 +- public/login.cpp | 2 +- public/new.cpp | 2 +- public/note.cpp | 2 +- public/notes.cpp | 2 +- read/index.cpp | 2 +- read/load.cpp | 2 +- read/verse.cpp | 2 +- resource/bb2resource.cpp | 2 +- resource/bbgateway.cpp | 2 +- resource/cache.cpp | 2 +- resource/comparative9edit.cpp | 2 +- resource/divider.cpp | 2 +- resource/download.cpp | 2 +- resource/image.cpp | 2 +- resource/imagefetch.cpp | 2 +- resource/images.cpp | 2 +- resource/img.cpp | 2 +- resource/manage.cpp | 2 +- resource/print.cpp | 2 +- resource/studylight.cpp | 2 +- resource/sword.cpp | 2 +- resource/translated9edit.cpp | 2 +- resource/user1edit.cpp | 2 +- resource/user9edit.cpp | 2 +- search/all.cpp | 2 +- search/getids.cpp | 2 +- search/getids2.cpp | 2 +- search/index.cpp | 2 +- search/originals.cpp | 2 +- search/replace.cpp | 2 +- search/replace2.cpp | 2 +- search/replacego.cpp | 2 +- search/replacego2.cpp | 2 +- search/replacepre.cpp | 2 +- search/replacepre2.cpp | 2 +- search/search2.cpp | 2 +- search/similar.cpp | 2 +- search/strong.cpp | 2 +- search/strongs.cpp | 2 +- sendreceive/index.cpp | 2 +- session/login.cpp | 2 +- session/logout.cpp | 2 +- session/password.cpp | 2 +- session/signup.cpp | 2 +- session/switch.cpp | 2 +- sprint/index.cpp | 2 +- styles/indexm.cpp | 2 +- styles/sheetm.cpp | 2 +- styles/sheets.cpp | 1 + styles/view.cpp | 2 +- system/googletranslate.cpp | 2 +- system/index.cpp | 2 +- user/account.cpp | 2 +- user/notifications.cpp | 4 ++-- versification/index.cpp | 2 +- versification/system.cpp | 2 +- webbb/search.cpp | 2 +- workspace/index.cpp | 2 +- workspace/organize.cpp | 2 +- workspace/settings.cpp | 2 +- 157 files changed, 171 insertions(+), 161 deletions(-) diff --git a/access/logic.cpp b/access/logic.cpp index 6127d1521..a21c2ed57 100644 --- a/access/logic.cpp +++ b/access/logic.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #include #include #include +#include using namespace std; diff --git a/bb/book.cpp b/bb/book.cpp index 64de1ca24..4fddb793b 100644 --- a/bb/book.cpp +++ b/bb/book.cpp @@ -49,7 +49,7 @@ std::string bible_book_url () bool bible_book_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/bb/chapter.cpp b/bb/chapter.cpp index bbedbde8a..da52a7b45 100644 --- a/bb/chapter.cpp +++ b/bb/chapter.cpp @@ -45,7 +45,7 @@ std::string bible_chapter_url () bool bible_chapter_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/bb/css.cpp b/bb/css.cpp index 8abdf5cf6..85804e2c8 100644 --- a/bb/css.cpp +++ b/bb/css.cpp @@ -42,7 +42,7 @@ std::string bible_css_url () bool bible_css_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/bb/import.cpp b/bb/import.cpp index 22ba82e9d..f5385fc42 100644 --- a/bb/import.cpp +++ b/bb/import.cpp @@ -44,7 +44,7 @@ std::string bible_import_url () bool bible_import_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/bb/manage.cpp b/bb/manage.cpp index 9f5b95eb8..214f012e3 100644 --- a/bb/manage.cpp +++ b/bb/manage.cpp @@ -59,7 +59,7 @@ std::string bible_manage_url () bool bible_manage_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/bb/order.cpp b/bb/order.cpp index 503334bb5..55dfc8f7c 100644 --- a/bb/order.cpp +++ b/bb/order.cpp @@ -40,7 +40,7 @@ std::string bible_order_url () bool bible_order_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/bb/settings.cpp b/bb/settings.cpp index 19a3ad11d..db9385337 100644 --- a/bb/settings.cpp +++ b/bb/settings.cpp @@ -67,7 +67,7 @@ std::string bible_settings_url () bool bible_settings_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/changes/change.cpp b/changes/change.cpp index 203ab8065..e33c77b3c 100644 --- a/changes/change.cpp +++ b/changes/change.cpp @@ -57,7 +57,7 @@ string changes_change_url () bool changes_change_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/changes/changes.cpp b/changes/changes.cpp index 989762ef3..6ff9489e8 100644 --- a/changes/changes.cpp +++ b/changes/changes.cpp @@ -59,7 +59,7 @@ string changes_changes_url () bool changes_changes_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/changes/manage.cpp b/changes/manage.cpp index d4e3f4097..2b3fd8bcd 100644 --- a/changes/manage.cpp +++ b/changes/manage.cpp @@ -50,7 +50,7 @@ string changes_manage_url () bool changes_manage_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/changes/statistics.cpp b/changes/statistics.cpp index 5f7b614d5..2eab43bcd 100644 --- a/changes/statistics.cpp +++ b/changes/statistics.cpp @@ -43,7 +43,7 @@ string changes_statistics_url () bool changes_statistics_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/checks/index.cpp b/checks/index.cpp index 6773fd262..f29b1cd3d 100644 --- a/checks/index.cpp +++ b/checks/index.cpp @@ -44,7 +44,7 @@ std::string checks_index_url () bool checks_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/checks/settings.cpp b/checks/settings.cpp index d5bb9a668..7a319a923 100644 --- a/checks/settings.cpp +++ b/checks/settings.cpp @@ -51,7 +51,7 @@ bool checks_settings_acl ([[maybe_unused]] Webserver_Request& webserver_request) #ifdef HAVE_CLIENT return true; #else - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); #endif } diff --git a/checks/settingspairs.cpp b/checks/settingspairs.cpp index c62df6923..5c7b9bbab 100644 --- a/checks/settingspairs.cpp +++ b/checks/settingspairs.cpp @@ -49,7 +49,7 @@ bool checks_settingspairs_acl ([[maybe_unused]] Webserver_Request& webserver_req #ifdef HAVE_CLIENT return true; #else - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); #endif } diff --git a/checks/settingspatterns.cpp b/checks/settingspatterns.cpp index afed95e89..aafe4239b 100644 --- a/checks/settingspatterns.cpp +++ b/checks/settingspatterns.cpp @@ -42,7 +42,7 @@ bool checks_settingspatterns_acl ([[maybe_unused]] Webserver_Request& webserver_ #ifdef HAVE_CLIENT return true; #else - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); #endif } diff --git a/checks/settingssentences.cpp b/checks/settingssentences.cpp index b11811bb4..784be71b2 100644 --- a/checks/settingssentences.cpp +++ b/checks/settingssentences.cpp @@ -49,7 +49,7 @@ bool checks_settingssentences_acl ([[maybe_unused]] Webserver_Request& webserver #ifdef HAVE_CLIENT return true; #else - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); #endif } diff --git a/checks/suppress.cpp b/checks/suppress.cpp index 734490924..257ad62b7 100644 --- a/checks/suppress.cpp +++ b/checks/suppress.cpp @@ -42,7 +42,7 @@ string checks_suppress_url () bool checks_suppress_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/client/index.cpp b/client/index.cpp index 393e9a9e7..c538c6dde 100644 --- a/client/index.cpp +++ b/client/index.cpp @@ -45,7 +45,7 @@ std::string client_index_url () bool client_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::member ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::member ()); } diff --git a/collaboration/index.cpp b/collaboration/index.cpp index 71c83b7f6..ee9fc805f 100644 --- a/collaboration/index.cpp +++ b/collaboration/index.cpp @@ -42,7 +42,7 @@ std::string collaboration_index_url () bool collaboration_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::admin ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::admin ()); } diff --git a/collaboration/settings.cpp b/collaboration/settings.cpp index 2f6ee72e2..31d44a4d7 100644 --- a/collaboration/settings.cpp +++ b/collaboration/settings.cpp @@ -45,7 +45,7 @@ string collaboration_settings_url () bool collaboration_settings_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::admin ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::admin ()); } diff --git a/compare/index.cpp b/compare/index.cpp index 750602cf1..f3d392564 100644 --- a/compare/index.cpp +++ b/compare/index.cpp @@ -54,7 +54,7 @@ std::string compare_index_url () bool compare_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/consistency/index.cpp b/consistency/index.cpp index 7729e4a9d..9d1d2e66d 100644 --- a/consistency/index.cpp +++ b/consistency/index.cpp @@ -46,7 +46,7 @@ string consistency_index_url () bool consistency_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/consistency/input.cpp b/consistency/input.cpp index e65d47dca..d5796168d 100644 --- a/consistency/input.cpp +++ b/consistency/input.cpp @@ -34,7 +34,7 @@ string consistency_input_url () bool consistency_input_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/consistency/poll.cpp b/consistency/poll.cpp index 0db37525f..bf962a811 100644 --- a/consistency/poll.cpp +++ b/consistency/poll.cpp @@ -34,7 +34,7 @@ string consistency_poll_url () bool consistency_poll_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/developer/index.cpp b/developer/index.cpp index 9f0f1e9f9..4824c112d 100644 --- a/developer/index.cpp +++ b/developer/index.cpp @@ -34,6 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #include #include #include +#include using namespace std; @@ -45,7 +46,7 @@ const char * developer_index_url () bool developer_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::admin ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::admin ()); } diff --git a/edit/edit.cpp b/edit/edit.cpp index 0d6d1495e..cbaa031b3 100644 --- a/edit/edit.cpp +++ b/edit/edit.cpp @@ -41,7 +41,7 @@ string edit_edit_url () bool edit_edit_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [read, write] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/edit/id.cpp b/edit/id.cpp index 0d0a4d1bc..0456e95fc 100644 --- a/edit/id.cpp +++ b/edit/id.cpp @@ -37,7 +37,7 @@ string edit_id_url () bool edit_id_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/edit/index.cpp b/edit/index.cpp index 4b3aaf26e..8ab4e19a3 100644 --- a/edit/index.cpp +++ b/edit/index.cpp @@ -50,7 +50,7 @@ std::string edit_index_url () bool edit_index_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/edit/load.cpp b/edit/load.cpp index 442e38591..7a9272507 100644 --- a/edit/load.cpp +++ b/edit/load.cpp @@ -41,7 +41,7 @@ string edit_load_url () bool edit_load_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/edit/navigate.cpp b/edit/navigate.cpp index 085160c98..d835e15a1 100644 --- a/edit/navigate.cpp +++ b/edit/navigate.cpp @@ -36,7 +36,7 @@ std::string edit_navigate_url () bool edit_navigate_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/edit/position.cpp b/edit/position.cpp index 06ecea9c7..0b7ed5a16 100644 --- a/edit/position.cpp +++ b/edit/position.cpp @@ -36,7 +36,7 @@ std::string edit_position_url () bool edit_position_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/edit/preview.cpp b/edit/preview.cpp index 858a59181..bcd18f93a 100644 --- a/edit/preview.cpp +++ b/edit/preview.cpp @@ -47,7 +47,7 @@ string edit_preview_url () bool edit_preview_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/edit/save.cpp b/edit/save.cpp index df0626715..2598f105c 100644 --- a/edit/save.cpp +++ b/edit/save.cpp @@ -51,7 +51,7 @@ string edit_save_url () bool edit_save_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/edit/styles.cpp b/edit/styles.cpp index b50831c9c..83db060be 100644 --- a/edit/styles.cpp +++ b/edit/styles.cpp @@ -35,7 +35,7 @@ string edit_styles_url () bool edit_styles_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/edit/update.cpp b/edit/update.cpp index 79daa8307..cb3f83066 100644 --- a/edit/update.cpp +++ b/edit/update.cpp @@ -53,7 +53,7 @@ string edit_update_url () bool edit_update_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editone2/index.cpp b/editone2/index.cpp index f720d810c..0d5ca2894 100644 --- a/editone2/index.cpp +++ b/editone2/index.cpp @@ -54,7 +54,7 @@ bool editone2_index_acl (Webserver_Request& webserver_request) { // Default minimum role for getting access. int minimum_role = Filter_Roles::translator (); - if (Filter_Roles::access_control (std::addressof(webserver_request), minimum_role)) + if (Filter_Roles::access_control (webserver_request, minimum_role)) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editone2/load.cpp b/editone2/load.cpp index 8cf8bdae5..709718a67 100644 --- a/editone2/load.cpp +++ b/editone2/load.cpp @@ -41,7 +41,7 @@ string editone2_load_url () bool editone2_load_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editone2/save.cpp b/editone2/save.cpp index d5a56e7a5..1393baf82 100644 --- a/editone2/save.cpp +++ b/editone2/save.cpp @@ -50,7 +50,7 @@ string editone2_save_url () bool editone2_save_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editone2/update.cpp b/editone2/update.cpp index e7df5ca80..e1f3189f1 100644 --- a/editone2/update.cpp +++ b/editone2/update.cpp @@ -51,7 +51,7 @@ string editone2_update_url () bool editone2_update_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editone2/verse.cpp b/editone2/verse.cpp index f4f0a0baf..dd5ecf0b4 100644 --- a/editone2/verse.cpp +++ b/editone2/verse.cpp @@ -34,7 +34,7 @@ string editone2_verse_url () bool editone2_verse_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editor/id.cpp b/editor/id.cpp index d340a1961..77d4eb6f4 100644 --- a/editor/id.cpp +++ b/editor/id.cpp @@ -37,7 +37,7 @@ string editor_id_url () bool editor_id_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editor/select.cpp b/editor/select.cpp index fc998e686..a78f6ce68 100644 --- a/editor/select.cpp +++ b/editor/select.cpp @@ -30,6 +30,7 @@ #include #include #include +#include using namespace std; @@ -41,7 +42,7 @@ string editor_select_url () bool editor_select_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) return true; + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; } diff --git a/editor/style.cpp b/editor/style.cpp index 9ff7e2403..27b655165 100644 --- a/editor/style.cpp +++ b/editor/style.cpp @@ -35,7 +35,7 @@ string editor_style_url () bool editor_style_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editusfm/focus.cpp b/editusfm/focus.cpp index 4327ccd26..a8ce64da5 100644 --- a/editusfm/focus.cpp +++ b/editusfm/focus.cpp @@ -35,7 +35,7 @@ string editusfm_focus_url () bool editusfm_focus_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editusfm/index.cpp b/editusfm/index.cpp index 96288c127..73fe87ade 100644 --- a/editusfm/index.cpp +++ b/editusfm/index.cpp @@ -47,7 +47,7 @@ std::string editusfm_index_url () bool editusfm_index_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/editusfm/load.cpp b/editusfm/load.cpp index 389cedf7b..2217bf34c 100644 --- a/editusfm/load.cpp +++ b/editusfm/load.cpp @@ -35,7 +35,7 @@ string editusfm_load_url () bool editusfm_load_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editusfm/offset.cpp b/editusfm/offset.cpp index 620967f1a..90999ca81 100644 --- a/editusfm/offset.cpp +++ b/editusfm/offset.cpp @@ -35,7 +35,7 @@ string editusfm_offset_url () bool editusfm_offset_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/editusfm/save.cpp b/editusfm/save.cpp index 42842e407..a93048313 100644 --- a/editusfm/save.cpp +++ b/editusfm/save.cpp @@ -47,7 +47,7 @@ string editusfm_save_url () bool editusfm_save_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/email/index.cpp b/email/index.cpp index f7db50c7c..c3ce411a0 100644 --- a/email/index.cpp +++ b/email/index.cpp @@ -41,7 +41,7 @@ string email_index_url () bool email_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::admin ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::admin ()); } diff --git a/export/odt.cpp b/export/odt.cpp index 4d4e5996b..c064d992a 100644 --- a/export/odt.cpp +++ b/export/odt.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include using namespace std; diff --git a/filter/roles.cpp b/filter/roles.cpp index 6b3e08f7a..3407e8ef4 100644 --- a/filter/roles.cpp +++ b/filter/roles.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #include #include +#include using namespace std; @@ -94,10 +95,9 @@ string Filter_Roles::text (int role) // This is for access control. // The "role" is the role required for the user to have access. -bool Filter_Roles::access_control (void * webserver_request, int role) +bool Filter_Roles::access_control (Webserver_Request& webserver_request, int role) { - Webserver_Request * request = static_cast(webserver_request); - int level = request->session_logic ()->currentLevel (); + int level = webserver_request.session_logic ()->currentLevel (); return level >= role; } diff --git a/filter/roles.h b/filter/roles.h index b32522e31..481125f35 100644 --- a/filter/roles.h +++ b/filter/roles.h @@ -20,7 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #pragma once #include -#include + +class Webserver_Request; class Filter_Roles { @@ -35,6 +36,6 @@ class Filter_Roles static int highest (); static std::string english (int role); static std::string text (int role); - static bool access_control (void * webserver_request, int role); + static bool access_control (Webserver_Request& webserver_request, int role); private: }; diff --git a/help/index.cpp b/help/index.cpp index 7fe21d75d..1d0c56ce0 100644 --- a/help/index.cpp +++ b/help/index.cpp @@ -50,7 +50,7 @@ bool help_index_url (const std::string& url) bool help_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/images/fetch.cpp b/images/fetch.cpp index 3c28330bc..18efb6468 100644 --- a/images/fetch.cpp +++ b/images/fetch.cpp @@ -34,7 +34,7 @@ string images_fetch_url () bool images_fetch_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/images/index.cpp b/images/index.cpp index ea499cbec..a6fa32bf8 100644 --- a/images/index.cpp +++ b/images/index.cpp @@ -44,7 +44,7 @@ string images_index_url () bool images_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/images/view.cpp b/images/view.cpp index 202ca3ccf..9bea8ccd7 100644 --- a/images/view.cpp +++ b/images/view.cpp @@ -43,7 +43,7 @@ string images_view_url () bool images_view_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/index/index.cpp b/index/index.cpp index 2eaa95d26..99cce17c6 100644 --- a/index/index.cpp +++ b/index/index.cpp @@ -35,6 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #include #include #include +#include const char * index_index_url () @@ -45,7 +46,7 @@ const char * index_index_url () bool index_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/index/listing.cpp b/index/listing.cpp index 7f462d5fc..a325ab02a 100644 --- a/index/listing.cpp +++ b/index/listing.cpp @@ -59,10 +59,10 @@ bool index_listing_acl (Webserver_Request& webserver_request, string url) { // Bible exports are public. if (url.find ("exports") == 0) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } // Any other files are for people with at least a member role. - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::member ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::member ()); } diff --git a/jobs/index.cpp b/jobs/index.cpp index 496544e35..fc62f523b 100644 --- a/jobs/index.cpp +++ b/jobs/index.cpp @@ -40,7 +40,7 @@ string jobs_index_url () bool jobs_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/journal/index.cpp b/journal/index.cpp index 991c0a4bc..55eb58a1c 100644 --- a/journal/index.cpp +++ b/journal/index.cpp @@ -48,7 +48,7 @@ bool journal_index_acl ([[maybe_unused]]Webserver_Request& webserver_request) #endif // In the Cloud, the role of Consultant or higher can view the journal. #ifdef HAVE_CLOUD - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) { + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) { return true; } #endif diff --git a/lexicon/definition.cpp b/lexicon/definition.cpp index a43c31346..4c005634a 100644 --- a/lexicon/definition.cpp +++ b/lexicon/definition.cpp @@ -38,7 +38,7 @@ string lexicon_definition_url () bool lexicon_definition_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/manage/accounts.cpp b/manage/accounts.cpp index 346100136..64b070b0a 100644 --- a/manage/accounts.cpp +++ b/manage/accounts.cpp @@ -52,7 +52,7 @@ string manage_accounts_url () bool manage_accounts_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/manage/exports.cpp b/manage/exports.cpp index 9307d3c2d..81772a006 100644 --- a/manage/exports.cpp +++ b/manage/exports.cpp @@ -39,6 +39,7 @@ #include #include #include +#include using namespace std; @@ -50,7 +51,7 @@ const char * manage_exports_url () bool manage_exports_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/manage/hyphenation.cpp b/manage/hyphenation.cpp index 1afff34a4..6c2388d34 100644 --- a/manage/hyphenation.cpp +++ b/manage/hyphenation.cpp @@ -31,6 +31,7 @@ #include #include #include +#include using namespace std; @@ -42,7 +43,7 @@ const char * manage_hyphenation_url () bool manage_hyphenation_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/manage/index.cpp b/manage/index.cpp index e3ad2ab61..c9f908b9d 100644 --- a/manage/index.cpp +++ b/manage/index.cpp @@ -35,7 +35,7 @@ string manage_index_url () bool manage_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/manage/privileges.cpp b/manage/privileges.cpp index 8acc57333..090ed02e2 100644 --- a/manage/privileges.cpp +++ b/manage/privileges.cpp @@ -42,7 +42,7 @@ string manage_privileges_url () bool manage_privileges_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/manage/users.cpp b/manage/users.cpp index 11bc3c636..7fa9f4363 100644 --- a/manage/users.cpp +++ b/manage/users.cpp @@ -55,7 +55,7 @@ string manage_users_url () bool manage_users_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/manage/write.cpp b/manage/write.cpp index bdadded3e..074d7281f 100644 --- a/manage/write.cpp +++ b/manage/write.cpp @@ -42,7 +42,7 @@ string manage_write_url () bool manage_write_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/mapping/index.cpp b/mapping/index.cpp index 35f721cb6..7341b9e1c 100644 --- a/mapping/index.cpp +++ b/mapping/index.cpp @@ -39,7 +39,7 @@ string mapping_index_url () bool mapping_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/mapping/map.cpp b/mapping/map.cpp index 083dbf74d..bb0139ee8 100644 --- a/mapping/map.cpp +++ b/mapping/map.cpp @@ -40,7 +40,7 @@ string mapping_map_url () bool mapping_map_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/menu/index.cpp b/menu/index.cpp index 3bbbc3aa4..6789bf8a6 100644 --- a/menu/index.cpp +++ b/menu/index.cpp @@ -32,7 +32,7 @@ std::string menu_index_url () bool menu_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/navigation/poll.cpp b/navigation/poll.cpp index 6d12a6ecb..7df5a2da3 100644 --- a/navigation/poll.cpp +++ b/navigation/poll.cpp @@ -33,7 +33,7 @@ string navigation_poll_url () bool navigation_poll_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/navigation/update.cpp b/navigation/update.cpp index c3dbb2e0b..89cdfda84 100644 --- a/navigation/update.cpp +++ b/navigation/update.cpp @@ -33,7 +33,7 @@ string navigation_update_url () bool navigation_update_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/nmt/index.cpp b/nmt/index.cpp index b91fcdb10..fba4ee649 100644 --- a/nmt/index.cpp +++ b/nmt/index.cpp @@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #include #include #include +#include using namespace std; @@ -40,7 +41,7 @@ const char * nmt_index_url () bool nmt_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/notes/actions.cpp b/notes/actions.cpp index c8c122c52..b00f6a785 100644 --- a/notes/actions.cpp +++ b/notes/actions.cpp @@ -47,7 +47,7 @@ string notes_actions_url () bool notes_actions_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/assign-1.cpp b/notes/assign-1.cpp index 227fc2e03..f228b9a05 100644 --- a/notes/assign-1.cpp +++ b/notes/assign-1.cpp @@ -44,7 +44,7 @@ string notes_assign_1_url () bool notes_assign_1_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/notes/assign-n.cpp b/notes/assign-n.cpp index b1f35abd6..6eccbd1c0 100644 --- a/notes/assign-n.cpp +++ b/notes/assign-n.cpp @@ -43,7 +43,7 @@ std::string notes_assign_n_url () bool notes_assign_n_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/notes/bb-1.cpp b/notes/bb-1.cpp index c1ae7d080..cfff6fc24 100644 --- a/notes/bb-1.cpp +++ b/notes/bb-1.cpp @@ -43,7 +43,7 @@ string notes_bible_1_url () bool notes_bible_1_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/bb-n.cpp b/notes/bb-n.cpp index fc76b6adc..e9918214d 100644 --- a/notes/bb-n.cpp +++ b/notes/bb-n.cpp @@ -43,7 +43,7 @@ string notes_bible_n_url () bool notes_bible_n_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/bulk.cpp b/notes/bulk.cpp index d71ec7afc..2378d77ef 100644 --- a/notes/bulk.cpp +++ b/notes/bulk.cpp @@ -48,7 +48,7 @@ string notes_bulk_url () bool notes_bulk_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } @@ -262,7 +262,7 @@ string notes_bulk (Webserver_Request& webserver_request) view.set_variable ("notescount", filter::strings::convert_to_string (identifiers.size())); - bool manager = Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + bool manager = Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); if (manager) { view.enable_zone ("manager"); } diff --git a/notes/click.cpp b/notes/click.cpp index fd0d280da..bbbd32d19 100644 --- a/notes/click.cpp +++ b/notes/click.cpp @@ -46,7 +46,7 @@ string notes_click_url () bool notes_click_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/edit.cpp b/notes/edit.cpp index 0e5360f42..dfd223780 100644 --- a/notes/edit.cpp +++ b/notes/edit.cpp @@ -44,7 +44,7 @@ string notes_edit_url () bool notes_edit_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/note.cpp b/notes/note.cpp index 54eacbbd6..adeebd013 100644 --- a/notes/note.cpp +++ b/notes/note.cpp @@ -137,7 +137,7 @@ string notes_note (Webserver_Request& webserver_request) } - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) { + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) { view.enable_zone ("consultant"); } if (access_logic::privilege_create_comment_notes (std::addressof(webserver_request))) { diff --git a/notes/severity-1.cpp b/notes/severity-1.cpp index 452de8995..208c4bffa 100644 --- a/notes/severity-1.cpp +++ b/notes/severity-1.cpp @@ -43,7 +43,7 @@ string notes_severity_1_url () bool notes_severity_1_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/severity-n.cpp b/notes/severity-n.cpp index 6b2822f3f..993c14f6d 100644 --- a/notes/severity-n.cpp +++ b/notes/severity-n.cpp @@ -43,7 +43,7 @@ string notes_severity_n_url () bool notes_severity_n_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/notes/status-1.cpp b/notes/status-1.cpp index 94a41da0a..997c8ec2a 100644 --- a/notes/status-1.cpp +++ b/notes/status-1.cpp @@ -45,7 +45,7 @@ bool notes_status_1_acl (Webserver_Request& webserver_request) { // Translator should be able to set the status of a note. // https://github.com/bibledit/cloud/issues/243 - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/notes/status-n.cpp b/notes/status-n.cpp index 6f82686ee..1079bcd84 100644 --- a/notes/status-n.cpp +++ b/notes/status-n.cpp @@ -43,7 +43,7 @@ string notes_status_n_url () bool notes_status_n_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/notes/summary.cpp b/notes/summary.cpp index 4f0ba840a..6174c9267 100644 --- a/notes/summary.cpp +++ b/notes/summary.cpp @@ -42,7 +42,7 @@ string notes_summary_url () bool notes_summary_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/notes/unassign-n.cpp b/notes/unassign-n.cpp index cf884933f..262cba27c 100644 --- a/notes/unassign-n.cpp +++ b/notes/unassign-n.cpp @@ -43,7 +43,7 @@ string notes_unassign_n_url () bool notes_unassign_n_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/notes/verses.cpp b/notes/verses.cpp index 6bcdc750b..66cd5c5ce 100644 --- a/notes/verses.cpp +++ b/notes/verses.cpp @@ -43,7 +43,7 @@ string notes_verses_url () bool notes_verses_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/paratext/index.cpp b/paratext/index.cpp index 920d8c556..3745e5d58 100644 --- a/paratext/index.cpp +++ b/paratext/index.cpp @@ -43,7 +43,7 @@ string paratext_index_url () bool paratext_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/personalize/index.cpp b/personalize/index.cpp index 7aa70d183..db2c33e42 100644 --- a/personalize/index.cpp +++ b/personalize/index.cpp @@ -56,7 +56,7 @@ string personalize_index_url () bool personalize_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::member ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::member ()); } @@ -449,7 +449,7 @@ string personalize_index (Webserver_Request& webserver_request) // Enable the sections with settings relevant to the user and device. bool resources = access_logic::privilege_view_resources (std::addressof(webserver_request)); if (resources) view.enable_zone ("resources"); - bool bibles = Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + bool bibles = Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); if (read || write) bibles = true; if (bibles) view.enable_zone ("bibles"); diff --git a/public/chapter.cpp b/public/chapter.cpp index 03d7b0c86..3e6d9ec33 100644 --- a/public/chapter.cpp +++ b/public/chapter.cpp @@ -35,7 +35,7 @@ std::string public_chapter_url () bool public_chapter_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/comment.cpp b/public/comment.cpp index c7cb2ca06..cc8bd00e1 100644 --- a/public/comment.cpp +++ b/public/comment.cpp @@ -43,7 +43,7 @@ string public_comment_url () bool public_comment_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/create.cpp b/public/create.cpp index 8c571ed9c..6937727ec 100644 --- a/public/create.cpp +++ b/public/create.cpp @@ -46,7 +46,7 @@ string public_create_url () bool public_create_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/index.cpp b/public/index.cpp index b4577ebf1..68a059189 100644 --- a/public/index.cpp +++ b/public/index.cpp @@ -45,7 +45,7 @@ string public_index_url () bool public_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/login.cpp b/public/login.cpp index b35f4419e..990fbdeb9 100644 --- a/public/login.cpp +++ b/public/login.cpp @@ -39,7 +39,7 @@ const char * public_login_url () bool public_login_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/new.cpp b/public/new.cpp index c12e368c6..1049b3399 100644 --- a/public/new.cpp +++ b/public/new.cpp @@ -42,7 +42,7 @@ string public_new_url () bool public_new_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/note.cpp b/public/note.cpp index 5ba342569..3479859fa 100644 --- a/public/note.cpp +++ b/public/note.cpp @@ -40,7 +40,7 @@ string public_note_url () bool public_note_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/public/notes.cpp b/public/notes.cpp index d7000f8ae..79dd998e4 100644 --- a/public/notes.cpp +++ b/public/notes.cpp @@ -36,7 +36,7 @@ string public_notes_url () bool public_notes_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/read/index.cpp b/read/index.cpp index 856219bdc..c80c02cb4 100644 --- a/read/index.cpp +++ b/read/index.cpp @@ -55,7 +55,7 @@ string read_index_url () bool read_index_acl (Webserver_Request& webserver_request) { int role = Filter_Roles::translator (); - if (Filter_Roles::access_control (std::addressof(webserver_request), role)) + if (Filter_Roles::access_control (webserver_request, role)) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/read/load.cpp b/read/load.cpp index e41e379d8..cb9b266b5 100644 --- a/read/load.cpp +++ b/read/load.cpp @@ -41,7 +41,7 @@ string read_load_url () bool read_load_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/read/verse.cpp b/read/verse.cpp index 0f5e663d5..1611833de 100644 --- a/read/verse.cpp +++ b/read/verse.cpp @@ -34,7 +34,7 @@ string read_verse_url () bool read_verse_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/resource/bb2resource.cpp b/resource/bb2resource.cpp index 0047a3b1d..aac7bdc5a 100644 --- a/resource/bb2resource.cpp +++ b/resource/bb2resource.cpp @@ -44,7 +44,7 @@ std::string resource_bible2resource_url () bool resource_bible2resource_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/bbgateway.cpp b/resource/bbgateway.cpp index 1dcb24403..c18907981 100644 --- a/resource/bbgateway.cpp +++ b/resource/bbgateway.cpp @@ -54,7 +54,7 @@ string resource_biblegateway_url () bool resource_biblegateway_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/resource/cache.cpp b/resource/cache.cpp index fcf061038..c1e1005e4 100644 --- a/resource/cache.cpp +++ b/resource/cache.cpp @@ -49,7 +49,7 @@ string resource_cache_url () bool resource_cache_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::member ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::member ()); } diff --git a/resource/comparative9edit.cpp b/resource/comparative9edit.cpp index 1a109a631..14f0dcd86 100644 --- a/resource/comparative9edit.cpp +++ b/resource/comparative9edit.cpp @@ -55,7 +55,7 @@ string resource_comparative9edit_url () bool resource_comparative9edit_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/divider.cpp b/resource/divider.cpp index b4cf7a2da..2f7d1a0b2 100644 --- a/resource/divider.cpp +++ b/resource/divider.cpp @@ -54,7 +54,7 @@ string resource_divider_url () bool resource_divider_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/resource/download.cpp b/resource/download.cpp index f57a8e92f..eaba0e9a5 100644 --- a/resource/download.cpp +++ b/resource/download.cpp @@ -47,7 +47,7 @@ string resource_download_url () bool resource_download_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::member ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::member ()); } diff --git a/resource/image.cpp b/resource/image.cpp index 4cae733de..41dcc1f6d 100644 --- a/resource/image.cpp +++ b/resource/image.cpp @@ -48,7 +48,7 @@ string resource_image_url () bool resource_image_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/imagefetch.cpp b/resource/imagefetch.cpp index b57726a4a..8a43755f9 100644 --- a/resource/imagefetch.cpp +++ b/resource/imagefetch.cpp @@ -33,7 +33,7 @@ std::string resource_imagefetch_url () bool resource_imagefetch_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/resource/images.cpp b/resource/images.cpp index 9225183ef..c31117076 100644 --- a/resource/images.cpp +++ b/resource/images.cpp @@ -43,7 +43,7 @@ string resource_images_url () bool resource_images_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/img.cpp b/resource/img.cpp index f17608b55..ceb13e628 100644 --- a/resource/img.cpp +++ b/resource/img.cpp @@ -45,7 +45,7 @@ string resource_img_url () bool resource_img_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/manage.cpp b/resource/manage.cpp index 45da24424..292625831 100644 --- a/resource/manage.cpp +++ b/resource/manage.cpp @@ -44,7 +44,7 @@ string resource_manage_url () bool resource_manage_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/print.cpp b/resource/print.cpp index 203c966b5..744571593 100644 --- a/resource/print.cpp +++ b/resource/print.cpp @@ -47,7 +47,7 @@ string resource_print_url () bool resource_print_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/resource/studylight.cpp b/resource/studylight.cpp index 2ab28edbe..5d40e4d16 100644 --- a/resource/studylight.cpp +++ b/resource/studylight.cpp @@ -54,7 +54,7 @@ string resource_studylight_url () bool resource_studylight_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/resource/sword.cpp b/resource/sword.cpp index 9fe809e29..6388d3744 100644 --- a/resource/sword.cpp +++ b/resource/sword.cpp @@ -43,7 +43,7 @@ string resource_sword_url () bool resource_sword_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/resource/translated9edit.cpp b/resource/translated9edit.cpp index 42b7a4da0..bb1fc9051 100644 --- a/resource/translated9edit.cpp +++ b/resource/translated9edit.cpp @@ -56,7 +56,7 @@ string resource_translated9edit_url () bool resource_translated9edit_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/user1edit.cpp b/resource/user1edit.cpp index 4eb3f3709..1065fba29 100644 --- a/resource/user1edit.cpp +++ b/resource/user1edit.cpp @@ -47,7 +47,7 @@ string resource_user1edit_url () bool resource_user1edit_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/resource/user9edit.cpp b/resource/user9edit.cpp index ec5ebc118..c53f8960e 100644 --- a/resource/user9edit.cpp +++ b/resource/user9edit.cpp @@ -43,7 +43,7 @@ string resource_user9edit_url () bool resource_user9edit_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/search/all.cpp b/search/all.cpp index 338170d70..da252646b 100644 --- a/search/all.cpp +++ b/search/all.cpp @@ -43,7 +43,7 @@ string search_all_url () bool search_all_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/search/getids.cpp b/search/getids.cpp index 338220311..ab23dd961 100644 --- a/search/getids.cpp +++ b/search/getids.cpp @@ -37,7 +37,7 @@ string search_getids_url () bool search_getids_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/getids2.cpp b/search/getids2.cpp index f60b29124..dd4854f20 100644 --- a/search/getids2.cpp +++ b/search/getids2.cpp @@ -37,7 +37,7 @@ string search_getids2_url () bool search_getids2_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/index.cpp b/search/index.cpp index adaa39c8d..21ca71139 100644 --- a/search/index.cpp +++ b/search/index.cpp @@ -40,7 +40,7 @@ std::string search_index_url () bool search_index_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/search/originals.cpp b/search/originals.cpp index f5b736812..6f1161f32 100644 --- a/search/originals.cpp +++ b/search/originals.cpp @@ -45,7 +45,7 @@ string search_originals_url () bool search_originals_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/search/replace.cpp b/search/replace.cpp index a13ee8e2d..60dd91067 100644 --- a/search/replace.cpp +++ b/search/replace.cpp @@ -43,7 +43,7 @@ string search_replace_url () bool search_replace_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/replace2.cpp b/search/replace2.cpp index ad3575108..3ef7fcb22 100644 --- a/search/replace2.cpp +++ b/search/replace2.cpp @@ -43,7 +43,7 @@ string search_replace2_url () bool search_replace2_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/replacego.cpp b/search/replacego.cpp index d0b54df4f..118c1c21b 100644 --- a/search/replacego.cpp +++ b/search/replacego.cpp @@ -43,7 +43,7 @@ string search_replacego_url () bool search_replacego_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/replacego2.cpp b/search/replacego2.cpp index 5cc175c2e..dd8cf368c 100644 --- a/search/replacego2.cpp +++ b/search/replacego2.cpp @@ -43,7 +43,7 @@ string search_replacego2_url () bool search_replacego2_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/replacepre.cpp b/search/replacepre.cpp index d3795bc00..e881d9404 100644 --- a/search/replacepre.cpp +++ b/search/replacepre.cpp @@ -38,7 +38,7 @@ string search_replacepre_url () bool search_replacepre_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/replacepre2.cpp b/search/replacepre2.cpp index b93645a35..9fd272efd 100644 --- a/search/replacepre2.cpp +++ b/search/replacepre2.cpp @@ -38,7 +38,7 @@ string search_replacepre2_url () bool search_replacepre2_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return write; diff --git a/search/search2.cpp b/search/search2.cpp index 921a1d4c3..4c4db3da6 100644 --- a/search/search2.cpp +++ b/search/search2.cpp @@ -45,7 +45,7 @@ string search_search2_url () bool search_search2_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/search/similar.cpp b/search/similar.cpp index e4ceb79b9..72d2409b7 100644 --- a/search/similar.cpp +++ b/search/similar.cpp @@ -43,7 +43,7 @@ string search_similar_url () bool search_similar_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/search/strong.cpp b/search/strong.cpp index fd26dd0de..6b96c58fd 100644 --- a/search/strong.cpp +++ b/search/strong.cpp @@ -43,7 +43,7 @@ string search_strong_url () bool search_strong_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/search/strongs.cpp b/search/strongs.cpp index c35b41690..88166e383 100644 --- a/search/strongs.cpp +++ b/search/strongs.cpp @@ -43,7 +43,7 @@ string search_strongs_url () bool search_strongs_acl (Webserver_Request& webserver_request) { - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; auto [ read, write ] = access_bible::any (std::addressof(webserver_request)); return read; diff --git a/sendreceive/index.cpp b/sendreceive/index.cpp index b8000b8c1..ce9041efd 100644 --- a/sendreceive/index.cpp +++ b/sendreceive/index.cpp @@ -55,7 +55,7 @@ bool sendreceive_index_acl (Webserver_Request& webserver_request) return true; } // The role of Translator or higher enables send/receive. - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ())) { + if (Filter_Roles::access_control (webserver_request, Filter_Roles::translator ())) { return true; } // No access. diff --git a/session/login.cpp b/session/login.cpp index adc73793b..f25726dfd 100644 --- a/session/login.cpp +++ b/session/login.cpp @@ -41,7 +41,7 @@ const char * session_login_url () bool session_login_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/session/logout.cpp b/session/logout.cpp index 945fa4481..bf5f2d234 100644 --- a/session/logout.cpp +++ b/session/logout.cpp @@ -31,7 +31,7 @@ const char * session_logout_url () bool session_logout_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/session/password.cpp b/session/password.cpp index 9ee32914d..a8f3246cd 100644 --- a/session/password.cpp +++ b/session/password.cpp @@ -37,7 +37,7 @@ const char * session_password_url () bool session_password_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/session/signup.cpp b/session/signup.cpp index 020f06fd9..c9dfd881a 100644 --- a/session/signup.cpp +++ b/session/signup.cpp @@ -61,7 +61,7 @@ const char * session_signup_url () bool session_signup_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/session/switch.cpp b/session/switch.cpp index 541dbe7bb..46367f8f2 100644 --- a/session/switch.cpp +++ b/session/switch.cpp @@ -36,7 +36,7 @@ const char * session_switch_url () bool session_switch_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/sprint/index.cpp b/sprint/index.cpp index 85646c05f..4375c6bef 100644 --- a/sprint/index.cpp +++ b/sprint/index.cpp @@ -47,7 +47,7 @@ string sprint_index_url () bool sprint_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/styles/indexm.cpp b/styles/indexm.cpp index e66e5b1c3..aaf997b07 100644 --- a/styles/indexm.cpp +++ b/styles/indexm.cpp @@ -48,7 +48,7 @@ string styles_indexm_url () bool styles_indexm_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/styles/sheetm.cpp b/styles/sheetm.cpp index aed2cc6dd..d3af0d29e 100644 --- a/styles/sheetm.cpp +++ b/styles/sheetm.cpp @@ -48,7 +48,7 @@ string styles_sheetm_url () bool styles_sheetm_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/styles/sheets.cpp b/styles/sheets.cpp index e6153499e..a0bef475a 100644 --- a/styles/sheets.cpp +++ b/styles/sheets.cpp @@ -25,6 +25,7 @@ #include #include #include +#include using namespace std; diff --git a/styles/view.cpp b/styles/view.cpp index 0cc166027..1efe4e42e 100644 --- a/styles/view.cpp +++ b/styles/view.cpp @@ -49,7 +49,7 @@ string styles_view_url () bool styles_view_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::translator ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::translator ()); } diff --git a/system/googletranslate.cpp b/system/googletranslate.cpp index 3a9c9aaab..beafe03e8 100644 --- a/system/googletranslate.cpp +++ b/system/googletranslate.cpp @@ -40,7 +40,7 @@ string system_googletranslate_url () bool system_googletranslate_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/system/index.cpp b/system/index.cpp index 27c3ed8a3..f7c6545ee 100644 --- a/system/index.cpp +++ b/system/index.cpp @@ -62,7 +62,7 @@ bool system_index_acl ([[maybe_unused]] Webserver_Request& webserver_request) return true; #else // Cloud: Manager can make system settings. - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); #endif } diff --git a/user/account.cpp b/user/account.cpp index dad62e927..c12f04213 100644 --- a/user/account.cpp +++ b/user/account.cpp @@ -39,7 +39,7 @@ string user_account_url () bool user_account_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::member ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::member ()); } diff --git a/user/notifications.cpp b/user/notifications.cpp index 8a5d95be7..e7003ca98 100644 --- a/user/notifications.cpp +++ b/user/notifications.cpp @@ -46,7 +46,7 @@ string user_notifications_url () bool user_notifications_acl (Webserver_Request& webserver_request) { // Consultant has access. - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) return true; // Whoever can view notes has access. if (access_logic::privilege_view_notes (std::addressof(webserver_request))) @@ -249,7 +249,7 @@ string user_notifications (Webserver_Request& webserver_request) view.enable_zone ("readbible"); if (write_bible) view.enable_zone ("writebible"); - if (Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ())) + if (Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ())) view.enable_zone ("consultant"); view.set_variable ("error", email_setup_information (true, false)); diff --git a/versification/index.cpp b/versification/index.cpp index 32c0d48b6..59558fdf7 100644 --- a/versification/index.cpp +++ b/versification/index.cpp @@ -39,7 +39,7 @@ string versification_index_url () bool versification_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/versification/system.cpp b/versification/system.cpp index f544e309f..d5cb2d997 100644 --- a/versification/system.cpp +++ b/versification/system.cpp @@ -42,7 +42,7 @@ string versification_system_url () bool versification_system_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::manager ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::manager ()); } diff --git a/webbb/search.cpp b/webbb/search.cpp index bf80f5bbd..59943f51c 100644 --- a/webbb/search.cpp +++ b/webbb/search.cpp @@ -36,7 +36,7 @@ string webbible_search_url () bool webbible_search_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::guest ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::guest ()); } diff --git a/workspace/index.cpp b/workspace/index.cpp index 404af236a..475dd6290 100644 --- a/workspace/index.cpp +++ b/workspace/index.cpp @@ -42,7 +42,7 @@ std::string workspace_index_url () bool workspace_index_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/workspace/organize.cpp b/workspace/organize.cpp index a445136da..682dc144e 100644 --- a/workspace/organize.cpp +++ b/workspace/organize.cpp @@ -40,7 +40,7 @@ std::string workspace_organize_url () bool workspace_organize_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); } diff --git a/workspace/settings.cpp b/workspace/settings.cpp index 7ec71cde3..48ffbdb9c 100644 --- a/workspace/settings.cpp +++ b/workspace/settings.cpp @@ -43,7 +43,7 @@ string workspace_settings_url () bool workspace_settings_acl (Webserver_Request& webserver_request) { - return Filter_Roles::access_control (std::addressof(webserver_request), Filter_Roles::consultant ()); + return Filter_Roles::access_control (webserver_request, Filter_Roles::consultant ()); }