Administrators now see all password groups
Administrators now see all password groups after login.
This commit is contained in:
parent
3bd1f3b4c2
commit
f527d8657d
10
class.db.php
10
class.db.php
@ -120,7 +120,15 @@ if (!class_exists('PWSdb'))
|
||||
{
|
||||
$this->userPasswordGroups[$username] = array();
|
||||
|
||||
$sth = $this->prepare('SELECT permissions FROM usergroups WHERE groupname IN (\'' . join("', '", $this->userUsergroups($username)) . '\')');
|
||||
if ($this->isAdmin($username))
|
||||
{
|
||||
$query = 'SELECT groupname || \'+\' AS permissions FROM passwordgroups';
|
||||
}
|
||||
else
|
||||
{
|
||||
$query = 'SELECT permissions FROM usergroups WHERE groupname IN (\'' . join("', '", $this->userUsergroups($username)) . '\')';
|
||||
}
|
||||
$sth = $this->prepare($query);
|
||||
$sth->execute();
|
||||
while ($row = $sth->fetch())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user