Parent Directory | Revision Log
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 |