This is an old revision of the document!


Superuser [BE]

Backend: This is a really dirty solution but it works well and should be a fine quick hack to let users work with admin rights but not edit admin section without special superuser check.

Docu: –
Forum: Quick and dirty Superuser functionality

Autor: O.Georgi http://phpwcms.de
CMS version: >= 1.4
Version: V1.0

Tag: mysite.com/phpwcms.php?superuser=muschi

file name: navi_text.inc.php

location: include/inc_lib/



Unzip the attached file navi_text.inc.php.zip (1 KiB, 137 downloads)

and replace navi_text.inc.php at include/inc_lib/ (maybe make a backup of original navi_text.inc.php).

Inside that file you can find a new “hidden” word - set it

    $phpwcms['superuser_checkword'] = 'muschi';

to whatever you like and keep it in mind.

By default the you will never see the admin menu until you type in the superuser URI like that:
mysite.com/phpwcms.php?superuser=muschi

See the images:



Then the superuser is registered in session and admin menu will be available as long as your session is active.


Variant 01

Only for this registered admin users the admin menu is available.
In the example the user with the username “hans” ans “erwin”.

The idea is based on it, that all users with admin rights will not see the admin menu.

File: include/inc_lib/navi_text.inc.php

Change

$wcsnav["admin"]        = '<a href="phpwcms.php?do=admin&amp;p=6">'.$BL['be_nav_admin'].'</a>';

to

// +KH: 14.04.10  Only for this registered admin users the admin menu is available
// -----------------------------------------------------
if ($_SESSION['wcs_user'] === 'hans' OR
    $_SESSION['wcs_user'] === 'erwin')
        $wcsnav["admin"]        = '<a href="phpwcms.php?do=admin&amp;p=6">'.$BL['be_nav_admin'].'</a>';
// -----------------------------------------------------


english/other-enhancements/hacks/superuser.1271255117.txt.gz · Last modified: 2018/06/03 18:08 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0