/[transports]/trunk/lib/Transports/Model/User.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 /trunk/lib/Transports/Model/User.pm

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

revision 27 by dpavlin, Fri May 26 21:21:25 2006 UTC revision 31 by dpavlin, Fri May 26 23:25:35 2006 UTC
# Line 78  Passes everything else off to the superc Line 78  Passes everything else off to the superc
78  sub current_user_can {  sub current_user_can {
79      my $self  = shift;      my $self  = shift;
80      my $right = shift;      my $right = shift;
81        my %args  = (@_);
82    
83          warn 'no $self->id' unless ($self->id);      return $self->SUPER::current_user_can( $right, %args ) unless ($right && $self->id && $self->current_user);
84    
     my %args  = (@_);  
85      #Carp::confess if ($right eq 'read' and not $args{'column'});      #Carp::confess if ($right eq 'read' and not $args{'column'});
86    
87      if ( $right eq 'read'      if ( $right eq 'read'
88          and $self->id == $self->current_user->id )          and ( $self->id == $self->current_user->id or $self->current_user->admin ) )
89      {      {
90          return 1;          return 1;
91      } elsif ( $right eq 'read' and $args{'column'} eq 'name' ) {      } elsif ( $right eq 'read' and $args{'column'} eq 'name' ) {

Legend:
Removed from v.27  
changed lines
  Added in v.31

  ViewVC Help
Powered by ViewVC 1.1.26