aboutsummaryrefslogtreecommitdiffstats
path: root/admin/cat_perm.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-10-09 19:39:59 +0000
committerz0rglub <z0rglub@piwigo.org>2003-10-09 19:39:59 +0000
commitaf22c24545b061ed3efd7e460a7abd3782d85cd5 (patch)
tree320a4a561902b334c72b54bd19f3c05ef3dae51f /admin/cat_perm.php
parent721ce0f934d900bbd1e78a1707195627b223141a (diff)
Only the webmaster can modify webmaster's permissions
git-svn-id: http://piwigo.org/svn/trunk@190 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/cat_perm.php')
-rw-r--r--admin/cat_perm.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index f77a01f0b..ac63e3b6e 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -128,7 +128,11 @@ if ( mysql_num_rows( $result ) > 0 )
//----------------------------------------------------------------------- users
$query = 'SELECT id,username,status';
$query.= ' FROM '.PREFIX_TABLE.'users';
-$query.= " WHERE username != '".$conf['webmaster']."'";
+// only the webmaster can modify webmaster's permissions
+if ( $user['username'] != $conf['webmaster'] )
+{
+ $query.= " WHERE username != '".$conf['webmaster']."'";
+}
$query.= ';';
$result = mysql_query( $query );
while ( $row = mysql_fetch_array( $result ) )