Hide matomo users who have access to a site but not made by AlternC
Users made in the Matomo interface and given an access to a site that's in AlternC show up without this restriction. When that happens, the user is no longer able to modify permissions for any of the Matomo users from their AlternC account.
This commit is contained in:
parent
c95dd63c26
commit
e028b15e7b
|
@ -165,6 +165,12 @@ class m_piwik {
|
|||
$api_data->$user = 'noaccess';
|
||||
}
|
||||
}
|
||||
# Hide users who have access, but are not in AlternC
|
||||
foreach (get_object_vars($api_data) as $user => $access) {
|
||||
if (!in_array($user, $this->alternc_users)) {
|
||||
unset($api_data->$user);
|
||||
}
|
||||
}
|
||||
return $api_data;
|
||||
}
|
||||
else return FALSE;
|
||||
|
|
Loading…
Reference in New Issue