Revision d8ac0828
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/AuthUser.pm | ||
---|---|---|
8 | 8 |
use List::Util qw(first); |
9 | 9 |
|
10 | 10 |
use SL::DB::MetaSetup::AuthUser; |
11 |
use SL::DB::Manager::AuthUser; |
|
11 | 12 |
use SL::DB::AuthUserGroup; |
12 | 13 |
|
13 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
|
14 |
__PACKAGE__->meta->make_manager_class; |
|
15 |
|
|
16 | 14 |
__PACKAGE__->meta->schema('auth'); |
17 | 15 |
|
18 | 16 |
__PACKAGE__->meta->add_relationship( |
... | ... | |
44 | 42 |
return $cfg ? $cfg->cfg_value : undef; |
45 | 43 |
} |
46 | 44 |
|
45 |
sub config_values { |
|
46 |
my $self = shift; |
|
47 |
|
|
48 |
if (0 != scalar(@_)) { |
|
49 |
my %settings = (ref($_[0]) || '') eq 'HASH' ? %{ $_[0] } : @_; |
|
50 |
$self->configs([ map { SL::DB::AuthUserConfig->new(cfg_key => $_, cfg_value => $settings{$_}) } keys %settings ]); |
|
51 |
} |
|
52 |
|
|
53 |
return { map { ($_->cfg_key => $_->cfg_value) } @{ $self->configs } }; |
|
54 |
} |
|
55 |
|
|
47 | 56 |
1; |
Auch abrufbar als: Unified diff
Admin: Teile von admin.pl in neuen Controller Admin verschoben; Mandanten anzeigen