/[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 73 by dpavlin, Thu Jan 25 21:16:49 2007 UTC revision 74 by dpavlin, Sun Jan 28 00:59:43 2007 UTC
# Line 61  sub current_user_can { Line 61  sub current_user_can {
61    
62          my ($action,$item,$name) = @_;          my ($action,$item,$name) = @_;
63    
64    #       warn "$action | $item | $name ";
65    
66          # prevent deep recursion for next rule          # prevent deep recursion for next rule
67          if ( $action && $item && $name &&          if ( $action && $item && $name &&
68                  $action eq 'read' && $item eq 'column' && ( $name eq 'owner' || $name eq 'visible' )                  $action eq 'read' && $item eq 'column' && ( $name eq 'owner' || $name eq 'visible' )
# Line 72  sub current_user_can { Line 74  sub current_user_can {
74                  return 1;                  return 1;
75          };          };
76    
77          return 1 if ( $self->visible && self->current_user->role('edit'));          return 1 if ( $self->visible && $self->current_user->role('edit'));
78            return 1 if ( $action eq 'create' && $self->current_user->role('edit'));
79    
80          return 1 if ( $self->current_user->is_superuser );          return 1 if ( $self->current_user->is_superuser );
81    

Legend:
Removed from v.73  
changed lines
  Added in v.74

  ViewVC Help
Powered by ViewVC 1.1.26