From: Sven Schöling Date: Fri, 20 May 2011 11:04:36 +0000 (+0200) Subject: assert kosmetik. X-Git-Tag: release-2.6.3~25^2~17 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f90fcfb985a9c98d8e00717929717012e431f8c9;p=kivitendo-erp.git assert kosmetik. --- diff --git a/SL/Auth.pm b/SL/Auth.pm index 6fb66c482..109b75ce3 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -1092,25 +1092,20 @@ sub check_right { } sub assert { - $main::lxdebug->enter_sub(2); - - my $self = shift; - my $right = shift; - my $dont_abort = shift; - - my $form = $main::form; + $::lxdebug->enter_sub(2); + my ($self, $right, $dont_abort) = @_; - if ($self->check_right($form->{login}, $right)) { - $main::lxdebug->leave_sub(2); + if ($self->check_right($::form->{login}, $right)) { + $::lxdebug->leave_sub(2); return 1; } if (!$dont_abort) { - delete $form->{title}; - $form->show_generic_error($main::locale->text("You do not have the permissions to access this function.")); + delete $::form->{title}; + $::form->show_generic_error($::locale->text("You do not have the permissions to access this function.")); } - $main::lxdebug->leave_sub(2); + $::lxdebug->leave_sub(2); return 0; }