/[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 41 by dpavlin, Sat May 27 22:54:11 2006 UTC revision 47 by dpavlin, Tue May 30 18:50:16 2006 UTC
# Line 18  use base qw/Transports::Record/; Line 18  use base qw/Transports::Record/;
18    
19  # Your model-specific methods go here.  # Your model-specific methods go here.
20    
 =head1 available_values  
   
 return all names  
   
 =cut  
   
 sub available_values {  
         my $self = shift;  
         return $self->column("name")->valid_values;  
 }  
   
21  =head2 current_user_can ACTION  =head2 current_user_can ACTION
22    
23  Let everybody create, read and update, but not delete.  Let everybody create, read and update, but not delete.
# Line 41  sub current_user_can { Line 30  sub current_user_can {
30    
31          return 1 if ($self->current_user->admin);          return 1 if ($self->current_user->admin);
32    
33            return 1 if ($type eq 'read');
34    
35      # We probably want something like this eventually:      # We probably want something like this eventually:
36      if ($type =~ /(?:create|read|update)/i) {      if ($type =~ /(?:create|update)/i) {
37    
38                  my $uos = Transports::Model::UserOnSource->new();                  my $uos = Transports::Model::UserOnSource->new();
39                  $uos->load_by_cols(                  $uos->load_by_cols(

Legend:
Removed from v.41  
changed lines
  Added in v.47

  ViewVC Help
Powered by ViewVC 1.1.26