ObjectsController: fix set-related permissions
This commit is contained in:
parent
7dde47dbca
commit
a7b796466f
|
@ -31,8 +31,10 @@ abstract class ObjectsController extends ActionController
|
||||||
|
|
||||||
protected function checkDirectorPermissions()
|
protected function checkDirectorPermissions()
|
||||||
{
|
{
|
||||||
|
if ($this->getRequest()->getActionName() !== 'sets') {
|
||||||
$this->assertPermission('director/' . $this->getPluralBaseType());
|
$this->assertPermission('director/' . $this->getPluralBaseType());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
|
@ -259,7 +261,7 @@ abstract class ObjectsController extends ActionController
|
||||||
$type = $this->getType();
|
$type = $this->getType();
|
||||||
$tType = $this->translate(ucfirst($type));
|
$tType = $this->translate(ucfirst($type));
|
||||||
$this
|
$this
|
||||||
->assertPermission('director/admin')
|
->assertPermission('director/' . $this->getBaseType() . '_sets')
|
||||||
->addObjectsTabs()
|
->addObjectsTabs()
|
||||||
->requireSupportFor('Sets')
|
->requireSupportFor('Sets')
|
||||||
->setAutorefreshInterval(10)
|
->setAutorefreshInterval(10)
|
||||||
|
@ -268,9 +270,7 @@ abstract class ObjectsController extends ActionController
|
||||||
$tType
|
$tType
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->actions()/*->add(
|
$this->actions()->add(
|
||||||
$this->getBackToDashboardLink()
|
|
||||||
)*/->add(
|
|
||||||
Link::create(
|
Link::create(
|
||||||
$this->translate('Add'),
|
$this->translate('Add'),
|
||||||
"director/${type}set/add",
|
"director/${type}set/add",
|
||||||
|
|
Loading…
Reference in New Issue