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

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

revision 22 by dpavlin, Fri May 26 18:35:08 2006 UTC revision 36 by dpavlin, Sat May 27 15:23:10 2006 UTC
# Line 41  sub current_user_can { Line 41  sub current_user_can {
41    
42      # We probably want something like this eventually:      # We probably want something like this eventually:
43      if ($type =~ /(?:create|read|update)/i) {      if ($type =~ /(?:create|read|update)/i) {
44    
45                    my $uos = Transports::Model::UserOnSource->new();
46                    $uos->load_by_cols(
47                            user_on => $self->current_user->id,
48                            source => $self->id
49                    );
50                    return undef if ($self->current_user->id && ! $uos->id);
51    
52          return 1;          return 1;
53      } else {      } else {
54          return $self->SUPER::current_user_can($type, @_);          return $self->SUPER::current_user_can($type, @_);

Legend:
Removed from v.22  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.26