Revision f90fcfb9
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/Auth.pm | ||
---|---|---|
1092 | 1092 |
} |
1093 | 1093 |
|
1094 | 1094 |
sub assert { |
1095 |
$main::lxdebug->enter_sub(2); |
|
1096 |
|
|
1097 |
my $self = shift; |
|
1098 |
my $right = shift; |
|
1099 |
my $dont_abort = shift; |
|
1100 |
|
|
1101 |
my $form = $main::form; |
|
1095 |
$::lxdebug->enter_sub(2); |
|
1096 |
my ($self, $right, $dont_abort) = @_; |
|
1102 | 1097 |
|
1103 |
if ($self->check_right($form->{login}, $right)) { |
|
1104 |
$main::lxdebug->leave_sub(2);
|
|
1098 |
if ($self->check_right($::form->{login}, $right)) {
|
|
1099 |
$::lxdebug->leave_sub(2); |
|
1105 | 1100 |
return 1; |
1106 | 1101 |
} |
1107 | 1102 |
|
1108 | 1103 |
if (!$dont_abort) { |
1109 |
delete $form->{title}; |
|
1110 |
$form->show_generic_error($main::locale->text("You do not have the permissions to access this function."));
|
|
1104 |
delete $::form->{title};
|
|
1105 |
$::form->show_generic_error($::locale->text("You do not have the permissions to access this function."));
|
|
1111 | 1106 |
} |
1112 | 1107 |
|
1113 |
$main::lxdebug->leave_sub(2);
|
|
1108 |
$::lxdebug->leave_sub(2); |
|
1114 | 1109 |
|
1115 | 1110 |
return 0; |
1116 | 1111 |
} |
Auch abrufbar als: Unified diff
assert kosmetik.