Changeset 4006:4de7ea99ccac
- Timestamp:
- 07/09/19 13:10:33 (6 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/index.php
r3947 r4006 29 29 } 30 30 31 dcPage::check('usage,contentadmin' );31 dcPage::check('usage,contentadmin', true); 32 32 33 33 if ($core->plugins->disableDepModules($core->adminurl->get('admin.home', []))) { -
inc/admin/lib.dc.page.php
r4002 r4006 24 24 25 25 # Auth check 26 public static function check($permissions )26 public static function check($permissions, $home = false) 27 27 { 28 28 $core = self::getCore(); … … 32 32 } 33 33 34 // Check if dashboard is not the current page et if it is granted for the user 35 if (!$home && $core->blog && $core->auth->check('usage,contentadmin', $core->blog->id)) { 36 // Go back to the dashboard 37 http::redirect(DC_ADMIN_URL); 38 } 39 34 40 if (session_id()) { 35 41 $core->session->destroy(); … … 39 45 40 46 # Check super admin 41 public static function checkSuper( )47 public static function checkSuper($home = false) 42 48 { 43 49 $core = self::getCore(); 44 50 45 51 if (!$core->auth->isSuperAdmin()) { 52 // Check if dashboard is not the current page et if it is granted for the user 53 if (!$home && $core->blog && $core->auth->check('usage,contentadmin', $core->blog->id)) { 54 // Go back to the dashboard 55 http::redirect(DC_ADMIN_URL); 56 } 57 46 58 if (session_id()) { 47 59 $core->session->destroy();
Note: See TracChangeset
for help on using the changeset viewer.