mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7398 from mikenz/patch-14
FIX readonly PermissionCheckboxSetField
This commit is contained in:
commit
5f8eb0806e
@ -242,7 +242,7 @@ class PermissionCheckboxSetField extends FormField
|
||||
// If the field is readonly, add a span that will replace the disabled checkbox input
|
||||
if ($this->readonly) {
|
||||
$icon = ($checked) ? 'check-mark-circle' : 'cancel-circled';
|
||||
$record = $this->form->getRecord();
|
||||
$record = is_object($this->form) ? $this->form->getRecord() : false;
|
||||
// Inherited codes are shown as a gray x
|
||||
if ($record && $record instanceof Member &&
|
||||
Permission::checkMember($record, 'ADMIN') && $code != 'ADMIN') {
|
||||
|
Loading…
Reference in New Issue
Block a user