Revision d5aaeae1
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Controller/Admin.pm | ||
---|---|---|
135 | 135 |
my $props = delete($params->{config_values}) || { }; |
136 | 136 |
my $is_new = !$params->{id}; |
137 | 137 |
|
138 |
# Assign empty arrays if the browser doesn't send those controls. |
|
139 |
$params->{clients} ||= []; |
|
140 |
$params->{groups} ||= []; |
|
141 |
|
|
138 | 142 |
$self->user($is_new ? SL::DB::AuthUser->new : SL::DB::AuthUser->new(id => $params->{id})->load) |
139 | 143 |
->assign_attributes(%{ $params }) |
140 | 144 |
->config_values({ %{ $self->user->config_values }, %{ $props } }); |
... | ... | |
206 | 210 |
my $params = delete($::form->{client}) || { }; |
207 | 211 |
my $is_new = !$params->{id}; |
208 | 212 |
|
213 |
# Assign empty arrays if the browser doesn't send those controls. |
|
214 |
$params->{groups} ||= []; |
|
215 |
$params->{users} ||= []; |
|
216 |
|
|
209 | 217 |
$self->client($is_new ? SL::DB::AuthClient->new : SL::DB::AuthClient->new(id => $params->{id})->load)->assign_attributes(%{ $params }); |
210 | 218 |
|
211 | 219 |
my @errors = $self->client->validate; |
... | ... | |
278 | 286 |
my $params = delete($::form->{group}) || { }; |
279 | 287 |
my $is_new = !$params->{id}; |
280 | 288 |
|
289 |
# Assign empty arrays if the browser doesn't send those controls. |
|
290 |
$params->{clients} ||= []; |
|
291 |
$params->{users} ||= []; |
|
292 |
|
|
281 | 293 |
$self->group($is_new ? SL::DB::AuthGroup->new : SL::DB::AuthGroup->new(id => $params->{id})->load)->assign_attributes(%{ $params }); |
282 | 294 |
|
283 | 295 |
my @errors = $self->group->validate; |
Auch abrufbar als: Unified diff
Admin: Zuordnungen User <-> Gruppen <-> Mandanten auch leeren können