function hosting_quota_permission in Hosting 7.3
Same name and namespace in other branches
- 7.4 quota/hosting_quota.module \hosting_quota_permission()
Implements hook_permission().
File
- quota/
hosting_quota.module, line 10 - Implement quota's for the resource used by client.
Code
function hosting_quota_permission() {
$permissions = array(
'edit all quotas' => array(
'title' => t('edit all quotas'),
),
'view all quotas' => array(
'title' => t('view all quotas'),
),
'view own quota' => array(
'title' => t('view own quota'),
),
'bypass all quotas' => array(
'title' => t('bypass all quotas'),
),
);
$all_resources = module_invoke_all('hosting_quota_resource');
foreach ($all_resources as $resource => $data) {
$permissions["bypass resource {$resource} limit"] = array(
'title' => t('bypass resource !resource limit', array(
'!resource' => $resource,
)),
);
}
return $permissions;
}