/[Grep]/lib/Grep/Model/Item.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/Grep/Model/Item.pm

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

revision 70 by dpavlin, Thu Feb 22 17:59:56 2007 UTC revision 140 by dpavlin, Tue May 8 12:31:49 2007 UTC
# Line 61  sub current_user_can { Line 61  sub current_user_can {
61    
62  #       Jifty->log->debug("current_user[$uid]_can($what) on Item ", $self->id || '???', " owner ", $owner_id || '???');  #       Jifty->log->debug("current_user[$uid]_can($what) on Item ", $self->id || '???', " owner ", $owner_id || '???');
63    
64          return 1 if ( $uid == $owner_id );          return 1 if ( $uid && $owner_id && $uid == $owner_id );
65    
66            # system user
67            return 1 if ( defined( $uid ) && $uid == 0 );
68    
69            warn "$uid can't $what";
70    
71            $self->SUPER::current_user_can( $what );
72  }  }
73    
74    =for TODO
75    
76    sub after_create {
77            my $self                    = shift;
78            my $insert_return_value_ref = shift;
79    
80            return unless $$insert_return_value_ref;    # bail if insert failed
81            $self->load($$insert_return_value_ref);     # load ourselves from db
82    
83            # Do whatever needs to be done here
84    
85    #       use Data::Dump qw/dump/;
86    #       warn "after_create ", dump( $self->as_hash );
87    
88            return; # return value is ignored
89    }
90    
91    =cut
92    
93  1;  1;
94    

Legend:
Removed from v.70  
changed lines
  Added in v.140

  ViewVC Help
Powered by ViewVC 1.1.26