mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix strict typing and do not show link to edit password in user list
This commit is contained in:
parent
566c1c5380
commit
7278a5f3fa
@ -471,11 +471,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/Type/UserPickerType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/Form/UserType.php
|
||||
|
||||
-
|
||||
message: "#^Only booleans are allowed in an if condition, mixed given\\.$#"
|
||||
count: 2
|
||||
|
@ -344,6 +344,11 @@ class UserController extends CRUDController
|
||||
),
|
||||
]
|
||||
);
|
||||
} elseif ('index' === $action) {
|
||||
return array_merge(
|
||||
['allow_change_password' => $this->parameterBag->get('chill_main.access_user_change_password')],
|
||||
$defaultTemplateParameters
|
||||
);
|
||||
}
|
||||
|
||||
// default behaviour
|
||||
|
@ -112,6 +112,7 @@ class UserType extends AbstractType
|
||||
},
|
||||
]);
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
if ($options['is_creation'] && $this->parameterBag->get('chill_main.access_user_change_password')) {
|
||||
$builder->add('plainPassword', RepeatedType::class, [
|
||||
'mapped' => false,
|
||||
|
@ -50,9 +50,13 @@
|
||||
<li>
|
||||
<a class="btn btn-edit" href="{{ path('chill_crud_admin_user_edit', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
|
||||
{% if allow_change_password is same as(true) %}
|
||||
<li>
|
||||
<a class="btn btn-chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" title="{{ 'Edit password'|trans|e('html_attr') }}"><i class="fa fa-ellipsis-h"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||
<li>
|
||||
<a class="btn btn-chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-user-secret"></i></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user