/[SQLSession]/trunk/lib/SQLSession/Model/Query.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/SQLSession/Model/Query.pm

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

revision 61 by dpavlin, Thu Jan 25 19:05:04 2007 UTC revision 71 by dpavlin, Thu Jan 25 21:16:49 2007 UTC
# Line 4  use warnings; Line 4  use warnings;
4  package SQLSession::Model::Query;  package SQLSession::Model::Query;
5  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
6  use SQLSession::Model::Database;  use SQLSession::Model::Database;
7    use SQLSession::Model::User;
8  use Scalar::Defer;  use Scalar::Defer;
9    
10  use SQLSession::Record schema {  use SQLSession::Record schema {
# Line 43  use SQLSession::Record schema { Line 44  use SQLSession::Record schema {
44                  refers_to SQLSession::Model::User by 'id',                  refers_to SQLSession::Model::User by 'id',
45                  label is 'Query owner',                  label is 'Query owner',
46                  default is defer { Jifty->web->current_user->id || 0 },                  default is defer { Jifty->web->current_user->id || 0 },
                 mandatory,  
47                  since '0.0.6';                  since '0.0.6';
48    
49          column created_on =>          column created_on =>
# Line 72  sub current_user_can { Line 72  sub current_user_can {
72                  return 1;                  return 1;
73          };          };
74    
75            return 1 if ( $self->visible && self->current_user->role('edit'));
76    
77            return 1 if ( $self->current_user->is_superuser );
78    
79          return 0;          return 0;
80  }  }
81    

Legend:
Removed from v.61  
changed lines
  Added in v.71

  ViewVC Help
Powered by ViewVC 1.1.26