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

View File

@ -37,14 +37,20 @@ class ObjectsTabs extends Tabs
'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),
'label' => $this->translate('Apply')
));
}
}
if ($auth->hasPermission('director/admin')) {
if ($object->supportsChoices()) {
$this->add('choices', array(
'url' => sprintf('director/templatechoices/%s', $type),