% unless (grep length, values %ARGS) {
% return; % } OK <%INIT> my $CurrentUser = RT::CurrentUser->new; if (length $user) { $CurrentUser->Load($user); $CurrentUser->Id or $m->abort(401); } if (length $pass) { # authenticate $CurrentUser->IsPassword($pass) or $m->abort(401); } if (length $object_class and length $object_id) { # check right against an object # ... } elsif (length $right) { $CurrentUser->UserObj->HasRight( Right => $right, Object => $RT::System ) or $m->abort(403); } %INIT> <%ARGS> $user => undef $pass => undef $right => undef $object_class => undef $object_id => undef %ARGS>