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