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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 51 - (show annotations)
Mon Jun 5 14:06:58 2006 UTC (17 years, 11 months ago) by dpavlin
File size: 748 byte(s)
added landscapes (collection of source and destination clients) to the mix
instead of specifing users for sources (and destinations which wasn't
implemented anyway)
1 use strict;
2 use warnings;
3
4 package Transports::Model::Landscape::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 column name =>
11 type is 'text',
12 label is 'Landscape',
13 is mandatory,
14 is distinct;
15
16 package Transports::Model::Landscape;
17 use base qw/Transports::Record/;
18
19 # Your model-specific methods go here.
20
21 =head2 current_user_can
22
23 everybody can read landscapes while only admins can update it
24
25 =cut
26
27 sub current_user_can {
28 my $self = shift;
29 my $right = shift;
30 my %args = (@_);
31
32 return 1 if ($right eq 'read' or $self->current_user->admin );
33
34 return $self->SUPER::current_user_can( $right, %args );
35 }
36
37 1;
38

  ViewVC Help
Powered by ViewVC 1.1.26