From bb481498beaa7f3ee48c2af7db317ff154cfbb5e Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 28 Jul 2018 18:33:37 +0200 Subject: [PATCH] Bug fixes --- .gitignore | 1 + bl-kernel/admin/controllers/content.php | 2 +- bl-kernel/admin/controllers/edit-content.php | 2 +- bl-kernel/admin/controllers/login.php | 2 +- bl-kernel/admin/controllers/new-content.php | 2 +- bl-kernel/admin/themes/booty/html/sidebar.php | 9 ++- bl-kernel/admin/views/content.php | 74 ++++++++++++++++--- bl-kernel/admin/views/edit-content.php | 12 ++- bl-kernel/admin/views/edit-user.php | 25 ++++++- bl-kernel/admin/views/new-user.php | 2 +- bl-kernel/admin/views/users.php | 2 - bl-kernel/ajax/user-logged.php | 2 +- bl-kernel/boot/rules/99.security.php | 12 +-- bl-kernel/dbpages.class.php | 23 ++---- bl-kernel/dbusers.class.php | 3 +- bl-kernel/helpers/log.class.php | 5 +- bl-kernel/helpers/theme.class.php | 5 ++ bl-kernel/js/bludit-ajax.php | 6 +- bl-kernel/login.class.php | 6 +- bl-kernel/pagex.class.php | 32 ++++---- bl-kernel/security.class.php | 2 +- bl-kernel/url.class.php | 6 +- bl-kernel/user.class.php | 5 ++ index.php | 4 - 24 files changed, 171 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index d422a0e4..a36cd717 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ bl-plugins/discovery bl-kernel/bludit.pro.php bl-themes/docs bl-themes/docsx +bl-themes/mediumish \ No newline at end of file diff --git a/bl-kernel/admin/controllers/content.php b/bl-kernel/admin/controllers/content.php index 7044229a..33612acb 100644 --- a/bl-kernel/admin/controllers/content.php +++ b/bl-kernel/admin/controllers/content.php @@ -4,7 +4,7 @@ // Check role // ============================================================================ -checkRole(array('admin', 'moderator')); +checkRole(array('admin', 'editor')); // ============================================================================ // Functions diff --git a/bl-kernel/admin/controllers/edit-content.php b/bl-kernel/admin/controllers/edit-content.php index 34326cfa..1582baca 100644 --- a/bl-kernel/admin/controllers/edit-content.php +++ b/bl-kernel/admin/controllers/edit-content.php @@ -4,7 +4,7 @@ // Check role // ============================================================================ -if (!checkRole(array('admin','moderator'), false)) { +if (!checkRole(array('admin','editor'), false)) { try { $pageKey = isset($_POST['key']) ? $_POST['key'] : $layout['parameters']; $page = new PageX($pageKey); diff --git a/bl-kernel/admin/controllers/login.php b/bl-kernel/admin/controllers/login.php index a30cbc85..66ce83e1 100644 --- a/bl-kernel/admin/controllers/login.php +++ b/bl-kernel/admin/controllers/login.php @@ -31,6 +31,7 @@ function checkLogin($args) Redirect::home(); } + // Other user without the role reader redirect to dashboard Redirect::page('dashboard'); return true; } @@ -40,7 +41,6 @@ function checkLogin($args) // Create alert Alert::set($Language->g('Username or password incorrect'), ALERT_STATUS_FAIL); - return false; } diff --git a/bl-kernel/admin/controllers/new-content.php b/bl-kernel/admin/controllers/new-content.php index 739f7c41..69572720 100644 --- a/bl-kernel/admin/controllers/new-content.php +++ b/bl-kernel/admin/controllers/new-content.php @@ -4,7 +4,7 @@ // Check role // ============================================================================ -checkRole(array('admin', 'moderator', 'editor')); +checkRole(array('admin', 'editor')); // ============================================================================ // Functions diff --git a/bl-kernel/admin/themes/booty/html/sidebar.php b/bl-kernel/admin/themes/booty/html/sidebar.php index a97cd767..3a92a4ea 100644 --- a/bl-kernel/admin/themes/booty/html/sidebar.php +++ b/bl-kernel/admin/themes/booty/html/sidebar.php @@ -16,6 +16,13 @@ p('New content') ?> + + + + + + @@ -57,7 +65,6 @@ } } ?> -