From a9f30fbdaf8162c9030aa6f042d094ae00e3b7c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 20 Jul 2015 16:17:02 +0200 Subject: [PATCH] Rechte: SL::Auth::all_rights() -> $::auth->all_rights --- SL/Controller/Admin.pm | 2 +- SL/DB/AuthGroup.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Controller/Admin.pm b/SL/Controller/Admin.pm index c2d9f29e7..2fb7de6ef 100644 --- a/SL/Controller/Admin.pm +++ b/SL/Controller/Admin.pm @@ -86,7 +86,7 @@ sub action_create_auth_tables { 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; } diff --git a/SL/DB/AuthGroup.pm b/SL/DB/AuthGroup.pm index 23dabb50c..033178643 100644 --- a/SL/DB/AuthGroup.pm +++ b/SL/DB/AuthGroup.pm @@ -48,11 +48,11 @@ sub rights_map { 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 || [] }) }; } -- 2.20.1