/[Arh]/lib/Arh/Model/Unit.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Arh/Model/Unit.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10 by dpavlin, Thu Nov 29 17:17:16 2007 UTC revision 11 by dpavlin, Thu Nov 29 19:04:56 2007 UTC
# Line 4  use warnings; Line 4  use warnings;
4  package Arh::Model::Unit;  package Arh::Model::Unit;
5  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
6    
7    use Data::Dump qw/dump/;
8    
9  use Arh::Record schema {  use Arh::Record schema {
10    
11          column name =>          column name =>
# Line 58  sub material { Line 60  sub material {
60  }  }
61    
62  sub current_user_can {  sub current_user_can {
63          my ( $self, $action,$item,$name ) = @_;          my ( $self, $action,$item,$value ) = @_;
64          return 1 if $self->current_user->superuser || $self->current_user->administrator;          warn "## |$action|$item|$value| user id: ",$self->current_user->id;
65          return 1 if $self->current_user->id && $action eq 'read';          return 1 if $self->current_user->superuser;
66            return 1 if $self->current_user->administrator;
67            return 1 if $action eq 'read';
68      return 0;      return 0;
69  }  }
70    

Legend:
Removed from v.10  
changed lines
  Added in v.11

  ViewVC Help
Powered by ViewVC 1.1.26