Revision a9f30fbd
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/Controller/Admin.pm | ||
---|---|---|
SL::DB::AuthGroup->new(
|
||
name => t8('Full Access'),
|
||
description => t8('Full access to all functions'),
|
||
rights => [ map { SL::DB::AuthGroupRight->new(right => $_, granted => 1) } SL::Auth::all_rights() ],
|
||
rights => [ map { SL::DB::AuthGroupRight->new(right => $_, granted => 1) } $::auth->all_rights ],
|
||
)->save;
|
||
}
|
||
|
SL/DB/AuthGroup.pm | ||
---|---|---|
|
||
if (@_) {
|
||
my %new_rights = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_;
|
||
$self->rights([ map { SL::DB::AuthGroupRight->new(right => $_, granted => $new_rights{$_} ? 1 : 0) } SL::Auth::all_rights() ]);
|
||
$self->rights([ map { SL::DB::AuthGroupRight->new(right => $_, granted => $new_rights{$_} ? 1 : 0) } $::auth->all_rights ]);
|
||
}
|
||
|
||
return {
|
||
map({ ($_ => 0) } SL::Auth::all_rights()),
|
||
map({ ($_ => 0) } $::auth->all_rights),
|
||
map({ ($_->right => $_->granted) } @{ $self->rights || [] })
|
||
};
|
||
}
|
Auch abrufbar als: Unified diff
Rechte: SL::Auth::all_rights()
> $::auth>all_rights