Enh #5169: Enable more than 50 groups to a user (#5171)

This commit is contained in:
Marc Farré 2021-07-19 10:25:25 +02:00 committed by GitHub
parent 63e726c9ff
commit a15ea86ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,7 @@
- Fix #4830: Fix Prerequisites / Self Test translations - Fix #4830: Fix Prerequisites / Self Test translations
- Fix #4459: Make UserFollow activity public - Fix #4459: Make UserFollow activity public
- Enh #3824: Run acceptance tests with pretty URLs - Enh #3824: Run acceptance tests with pretty URLs
- Enh #5169: Enable more than 50 groups to a user
1.9.0-beta.1 (June 15, 2021) 1.9.0-beta.1 (June 15, 2021)

View File

@ -259,7 +259,8 @@ class HForm extends \yii\base\Component
case 'multiselectdropdown': case 'multiselectdropdown':
$field = $this->form->field($model, $name)->widget(MultiSelect::class, [ $field = $this->form->field($model, $name)->widget(MultiSelect::class, [
'items' => $definition['items'], 'items' => $definition['items'],
'options' => $definition['options'] 'options' => $definition['options'],
'maxSelection' => $definition['maxSelection'] ?? 50,
]); ]);
break; break;
case 'dropdownlist': case 'dropdownlist':

View File

@ -149,6 +149,7 @@ class UserController extends Controller
'data-placeholder' => Yii::t('AdminModule.user', 'Select Groups'), 'data-placeholder' => Yii::t('AdminModule.user', 'Select Groups'),
'data-placeholder-more' => Yii::t('AdminModule.user', 'Add Groups...') 'data-placeholder-more' => Yii::t('AdminModule.user', 'Add Groups...')
], ],
'maxSelection' => 250,
'isVisible' => Yii::$app->user->can(new ManageGroups()) 'isVisible' => Yii::$app->user->can(new ManageGroups())
], ],
], ],