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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 51 - (show annotations)
Mon Jun 5 14:06:58 2006 UTC (17 years, 10 months ago) by dpavlin
File size: 957 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::Destination::Schema;
5 use Jifty::DBI::Schema;
6
7 use Transports::Model::Landscape;
8
9 column name =>
10 type is 'text',
11 label is 'Destination client',
12 is mandatory,
13 since '0.0.7';
14
15 column landscape =>
16 refers_to Transports::Model::Landscape,
17 label is 'Part of landscape',
18 is mandatory,
19 since '0.0.13';
20
21 # Your column definitions go here. See L<Jifty::DBI::Schema> for
22 # documentation about how to write column definitions.
23
24 package Transports::Model::Destination;
25 use base qw/Transports::Record/;
26
27 # Your model-specific methods go here.
28
29 =head2 current_user_can ACTION
30
31 Let everybody create, read and update, but not delete.
32
33 =cut
34
35 sub current_user_can {
36 my $self = shift;
37 my $type = shift;
38
39 # We probably want something like this eventually:
40 if ($type =~ /(?:create|read|update)/i) {
41 return 1;
42 } else {
43 return $self->SUPER::current_user_can($type, @_);
44 }
45 }
46
47 1;
48

  ViewVC Help
Powered by ViewVC 1.1.26