function cacheflush_ui_access_single_many in CacheFlush 7.3
Check access for 'any' and 'own' permissions.
Parameters
string $any: Permission string for any content.
string $single: Permission string for own content.
object $account: User account to check.
object $entity: The entity object.
Return value
bool Return TRUE if access is granted.
1 call to cacheflush_ui_access_single_many()
- cacheflush_ui_access in modules/
cacheflush_ui/ cacheflush_ui.module - Determines whether the given user can perform actions on cacheflush entity.
File
- modules/
cacheflush_ui/ cacheflush_ui.module, line 303 - Cacheflush User Interface.
Code
function cacheflush_ui_access_single_many($any, $single, $account, $entity) {
if ($access = user_access($any, $account)) {
return TRUE;
}
else {
$access = user_access($single, $account);
if ($access && $account->uid == $entity->uid) {
return TRUE;
}
}
return FALSE;
}