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

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

revision 87 by dpavlin, Thu Jan 25 20:42:11 2007 UTC revision 88 by dpavlin, Mon Feb 5 18:46:13 2007 UTC
# Line 15  sub _init { Line 15  sub _init {
15          my $self = shift;          my $self = shift;
16          my %args = (@_);          my %args = (@_);
17    
         warn "_init";  
   
18          if ( delete $args{'_bootstrap'} ) {          if ( delete $args{'_bootstrap'} ) {
19                  $self->is_bootstrap_user(1);                  $self->is_bootstrap_user(1);
20          } elsif( keys %args ) {          } elsif( keys %args ) {
# Line 34  sub _init { Line 32  sub _init {
32                          role => 'admin',                          role => 'admin',
33                  );                  );
34                  if ($r->id) {                  if ($r->id) {
35                          warn "turn on AdminMode for ", $self->current_user->user_object->email, $/;                          Jifty->log->debug("turn on AdminMode for ", $self->current_user->user_object->email);
36                          $self->is_superuser(1);                          $self->is_superuser(1);
37                  }                  }
38          }          }
# Line 67  sub role { Line 65  sub role {
65                  role => $role                  role => $role
66          );          );
67    
68          warn "role is '$role' for ", $self->current_user->user_object->email, " ",          Jifty->log->debug("role is '$role' for ",
69                  $r->id ? 'OK' : 'DENY', $/;                  $self->current_user->user_object->email, " ",
70                    $r->id ? 'OK' : 'DENY'
71            );
72    
73          return $r->id;          return $r->id;
74  }  }

Legend:
Removed from v.87  
changed lines
  Added in v.88

  ViewVC Help
Powered by ViewVC 1.1.26