RoleForm: Show a header for permissions and restrictions
This commit is contained in:
parent
616f1fe2c8
commit
5a10b06200
application/forms/Security
|
@ -174,7 +174,11 @@ class RoleForm extends RepositoryForm
|
||||||
foreach ($this->providedPermissions as $moduleName => $permissionList) {
|
foreach ($this->providedPermissions as $moduleName => $permissionList) {
|
||||||
$this->sortPermissions($permissionList);
|
$this->sortPermissions($permissionList);
|
||||||
|
|
||||||
$elements = [];
|
$elements = ['permission_header'];
|
||||||
|
$this->addElement('note', 'permission_header', [
|
||||||
|
'value' => '<h3>' . $this->translate('Permissions') . '</h3>'
|
||||||
|
]);
|
||||||
|
|
||||||
$hasFullPerm = false;
|
$hasFullPerm = false;
|
||||||
foreach ($permissionList as $name => $spec) {
|
foreach ($permissionList as $name => $spec) {
|
||||||
$elements[] = $name;
|
$elements[] = $name;
|
||||||
|
@ -199,6 +203,11 @@ class RoleForm extends RepositoryForm
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->providedRestrictions[$moduleName])) {
|
if (isset($this->providedRestrictions[$moduleName])) {
|
||||||
|
$elements[] = 'restriction_header';
|
||||||
|
$this->addElement('note', 'restriction_header', [
|
||||||
|
'value' => '<h3>' . $this->translate('Restrictions') . '</h3>'
|
||||||
|
]);
|
||||||
|
|
||||||
foreach ($this->providedRestrictions[$moduleName] as $name => $spec) {
|
foreach ($this->providedRestrictions[$moduleName] as $name => $spec) {
|
||||||
$elements[] = $name;
|
$elements[] = $name;
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
|
|
Loading…
Reference in New Issue