ObjectTabs: relax notification apply permissions

refs #1015
This commit is contained in:
Thomas Gelf 2017-07-14 11:26:59 +02:00
parent 1c4d6598c0
commit 5457a0865f
1 changed files with 9 additions and 3 deletions

View File

@ -26,25 +26,31 @@ class ObjectsTabs extends Tabs
if ($auth->hasPermission('director/admin')) {
if ($object->supportsImports()) {
$this->add('templates', array(
'url' => sprintf('director/%ss/templates', strtolower($type)),
'url' => sprintf('director/%ss/templates', strtolower($type)),
'label' => $this->translate('Templates'),
));
}
if ($object->supportsGroups()) {
$this->add('groups', array(
'url' => sprintf('director/%sgroups', $type),
'url' => sprintf('director/%sgroups', $type),
'label' => $this->translate('Groups')
));
}
}
if ($auth->hasPermission('director/admin') || (
$object->getShortTableName() && $auth->hasPermission('director/notifications')
)) {
if ($object->supportsApplyRules()) {
$this->add('applyrules', array(
'url' => sprintf('director/%ss/applyrules', $type),
'url' => sprintf('director/%ss/applyrules', $type),
'label' => $this->translate('Apply')
));
}
}
if ($auth->hasPermission('director/admin')) {
if ($object->supportsChoices()) {
$this->add('choices', array(
'url' => sprintf('director/templatechoices/%s', $type),