本文整理汇总了PHP中Piwik\Access::getSitesIdWithAdminAccess方法的典型用法代码示例。如果您正苦于以下问题:PHP Access::getSitesIdWithAdminAccess方法的具体用法?PHP Access::getSitesIdWithAdminAccess怎么用?PHP Access::getSitesIdWithAdminAccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Access
的用法示例。
在下文中一共展示了Access::getSitesIdWithAdminAccess方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hasAccessToSameSite
private function hasAccessToSameSite($login)
{
// users is allowed to see other users having view or admin access to these sites
if (!isset($this->idSitesWithAdmin)) {
$this->idSitesWithAdmin = $this->access->getSitesIdWithAdminAccess();
$this->usersWithAdminAccess = $this->model->getUsersSitesFromAccess('admin');
$this->usersWithViewAccess = $this->model->getUsersSitesFromAccess('view');
}
return isset($this->usersWithViewAccess[$login]) && array_intersect($this->idSitesWithAdmin, $this->usersWithViewAccess[$login]) || isset($this->usersWithAdminAccess[$login]) && array_intersect($this->idSitesWithAdmin, $this->usersWithAdminAccess[$login]);
}
示例2: testGetSitesIdWithAdminAccessWithEmptyAccess
public function testGetSitesIdWithAdminAccessWithEmptyAccess()
{
$access = new Access();
$this->assertEmpty($access->getSitesIdWithAdminAccess());
}