Changeset 18010

Show
Ignore:
Timestamp:
08/22/08 05:56:04 (5 months ago)
Author:
tokuhirom
Message:

fixed bugs, and added tests.

Location:
lang/perl/Nanto/trunk
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Nanto/trunk/lib/Nanto/Web/Plugin/Authorizer/MobileJPID.pm

    r17981 r18010  
    1212); 
    1313 
     14has 'unauthorized_message' => ( 
     15    is       => 'ro', 
     16    isa      => 'Str', 
     17    required => 1, 
     18); 
     19 
    1420hook 'authorize' => sub { 
    1521    my ($self, $req) = @_; 
     
    2026        HTTP::Engine::Response->new( 
    2127            status => 403, 
    22             body   => "you aren't have a permission", 
     28            body   => $self->unauthorized_message, 
    2329        ); 
    2430    } 
     
    2632 
    2733sub _auth { 
    28     my $req = shift; 
     34    my ($self, $req) = @_; 
    2935 
    3036    if ($req->mobile_attribute->can('user_id')) {