CGI-Application-Plugin-Authorization
    
    
  
  
  
view release on metacpan or search on metacpan
lib/CGI/Application/Plugin/Authorization.pm view on Meta::CPAN
 sub admin_runmode {
    my $self = shift;
    # User must be in the admin group to have access to this runmode
    return $self->authz->forbidden unless $self->authz->authorize('admin');
    # rest of the runmode
    ...
 }
 sub update_widget {
    my $self = shift;
    my $widget = $self->query->param('widget_id');
    # Can this user edit this widget in the widgets table?
    return $self->authz->forbidden unless $self->authz('dbaccess')->authorize(widgets => $widget);
    # save changes to the widget
    ...
 }
    
  
  
  
( run in 1.187 second using v1.01-cache-2.11-cpan-a1d94b6210f )