mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Merge branch 'v1.2-dev' of https://github.com/humhub/humhub into v1.2-dev
This commit is contained in:
commit
9c354fbde1
@ -104,7 +104,7 @@ class DropDownGridColumn extends DataColumn
|
||||
|
||||
if ($readonly) {
|
||||
if (isset($options[$model[$this->attribute]])) {
|
||||
return $options[$model[$this->attribute]];
|
||||
return Html::dropDownList($inputName, $model[$this->attribute], $options, array_merge($this->htmlOptions, ['readonly' => true, 'disabled' => true]));
|
||||
}
|
||||
return $model[$this->attribute];
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ use humhub\modules\user\widgets\PermissionGridEditor;
|
||||
?>
|
||||
<?php $this->beginContent('@admin/views/group/_manageLayout.php', ['group' => $group]) ?>
|
||||
<div class="panel-body">
|
||||
<?= PermissionGridEditor::widget(['permissionManager' => Yii::$app->user->permissionManager, 'groupId' => $group->id]); ?>
|
||||
<?= PermissionGridEditor::widget(['permissionManager' => Yii::$app->user->permissionManager, 'groupId' => $group->id, 'hideFixedPermissions' => false]); ?>
|
||||
</div>
|
||||
<?php $this->endContent(); ?>
|
@ -21,6 +21,11 @@ use humhub\libs\Html;
|
||||
class PermissionGridEditor extends GridView
|
||||
{
|
||||
|
||||
/**
|
||||
* @var boolean hide not changeable permissions
|
||||
*/
|
||||
public $hideFixedPermissions = true;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@ -104,7 +109,7 @@ class PermissionGridEditor extends GridView
|
||||
protected function getDataProvider()
|
||||
{
|
||||
return new ArrayDataProvider([
|
||||
'allModels' => $this->permissionManager->createPermissionArray($this->groupId, true),
|
||||
'allModels' => $this->permissionManager->createPermissionArray($this->groupId, $this->hideFixedPermissions),
|
||||
'sort' => [
|
||||
'attributes' => ['title', 'description', 'moduleId'],
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user