| … | |
… | |
| 311 | if ($actionID) { |
311 | if ($actionID) { |
| 312 | unless (grep { $_ eq $actionID } @{ VIEW_FORMS() }, @{ EDIT_FORMS() }, @{ EXPORT_FORMS() }) { |
312 | unless (grep { $_ eq $actionID } @{ VIEW_FORMS() }, @{ EDIT_FORMS() }, @{ EXPORT_FORMS() }) { |
| 313 | die "Action $actionID not found"; |
313 | die "Action $actionID not found"; |
| 314 | } |
314 | } |
| 315 | # Check permissions |
315 | # Check permissions |
| 316 | next if FORM_PERMS()->{$actionID} and not $authz->hasPermissions($user, FORM_PERMS()->{$actionID}); |
316 | if (not FORM_PERMS()->{$actionID} or $authz->hasPermissions($user, FORM_PERMS()->{$actionID})) { |
| 317 | my $actionHandler = "${actionID}_handler"; |
317 | my $actionHandler = "${actionID}_handler"; |
| 318 | my %genericParams; |
318 | my %genericParams; |
| 319 | foreach my $param (qw(selected_sets)) { |
319 | foreach my $param (qw(selected_sets)) { |
| 320 | $genericParams{$param} = [ $r->param($param) ]; |
320 | $genericParams{$param} = [ $r->param($param) ]; |
| 321 | } |
321 | } |
| 322 | my %actionParams = $self->getActionParams($actionID); |
322 | my %actionParams = $self->getActionParams($actionID); |
| 323 | my %tableParams = $self->getTableParams(); |
323 | my %tableParams = $self->getTableParams(); |
| 324 | print CGI::div({class=>"Message"}, CGI::p("Results of last action performed: ", $self->$actionHandler(\%genericParams, \%actionParams, \%tableParams))), CGI::hr(); |
324 | print CGI::div({class=>"Message"}, CGI::p("Results of last action performed: ", $self->$actionHandler(\%genericParams, \%actionParams, \%tableParams))), CGI::hr(); |
|
|
325 | } else { |
|
|
326 | return CGI::div({class=>"ResultsWithError"}, CGI::p("You are not authorized to perform this action.")); |
|
|
327 | } |
| 325 | |
328 | |
| 326 | } |
329 | } |
| 327 | |
330 | |
| 328 | ########## retrieve possibly changed values for member fields |
331 | ########## retrieve possibly changed values for member fields |
| 329 | |
332 | |