/[transports]/trunk/lib/Transports/Model/ReturnCode.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

Contents of /trunk/lib/Transports/Model/ReturnCode.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (show annotations)
Tue May 30 18:09:51 2006 UTC (18 years ago) by dpavlin
File size: 686 byte(s)
bunch of changes:
- added import operator user role (user_object->can_import),
  added import transort which sets return_code and optional comment - it can
  be executed by import operators or admins
- import operators will get just transports which aren't imported under /transports
1 use strict;
2 use warnings;
3
4 package Transports::Model::ReturnCode::Schema;
5 use Jifty::DBI::Schema;
6
7 # Your column definitions go here. See L<Jifty::DBI::Schema> for
8 # documentation about how to write column definitions.
9
10
11 column name =>
12 type is 'text',
13 label is 'Return code',
14 is mandatory,
15 since '0.0.12';
16
17 package Transports::Model::ReturnCode;
18 use base qw/Transports::Record/;
19
20 # Your model-specific methods go here.
21
22 =head2 current_user_can ACTION
23
24 allow everybody to read.
25
26 =cut
27
28 sub current_user_can {
29 my $self = shift;
30 my $type = shift;
31
32 if ($type eq 'read') {
33 return 1;
34 } else {
35 return $self->SUPER::current_user_can($type, @_);
36 }
37 }
38
39 1;
40

  ViewVC Help
Powered by ViewVC 1.1.26