/[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 1 by dpavlin, Thu May 4 15:12:03 2006 UTC revision 22 by dpavlin, Fri May 26 18:35:08 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    
21    =head1 available_values
22    
23    return all names
24    
25    =cut
26    
27  sub available_values {  sub available_values {
28          my $self = shift;          my $self = shift;
29          return $self->column("name")->valid_values;          return $self->column("name")->valid_values;
30  }  }
31    
32    =head2 current_user_can ACTION
33    
34    Let everybody create, read and update, but not delete.
35    
36    =cut
37    
38    sub current_user_can {
39        my $self = shift;
40        my $type = shift;
41    
42        # We probably want something like this eventually:
43        if ($type =~ /(?:create|read|update)/i) {
44            return 1;
45        } else {
46            return $self->SUPER::current_user_can($type, @_);
47        }
48    }
49    
50  1;  1;
51    

Legend:
Removed from v.1  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.26