/[A3C]/lib/A3C/Model/hrEduOrg.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 /lib/A3C/Model/hrEduOrg.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 124 by dpavlin, Tue May 20 09:49:27 2008 UTC revision 208 by dpavlin, Thu Jun 19 21:24:26 2008 UTC
# Line 3  use strict; Line 3  use strict;
3  use warnings;  use warnings;
4    
5  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
6    use Data::Dump qw/dump/;
7    
8  use A3C::Record schema {  use A3C::Record schema {
9    
# Line 196  sub name { Line 197  sub name {
197          return $self->cn . ' - ' . $self->o;          return $self->cn . ' - ' . $self->o;
198  }  }
199    
200    =head2 validate_uidNumber
201    
202    =cut
203    
204    sub validate_uidNumber {
205            my ( $self, $value ) = @_;
206            return ( 0, _('uidNumber must be only digits') ) unless $value =~ m/^\d+$/;
207            return ( 1, 'OK' );
208    }
209    
210    =head2 validate_gidNumber
211    
212    =cut
213    
214    sub validate_gidNumber {
215            my ( $self, $value ) = @_;
216            return ( 0, _('gidNumber must be only digits') ) unless $value =~ m/^\d+$/;
217            return ( 1, 'OK' );
218    }
219    
220  =head2 ACL  =head2 ACL
221    
# Line 205  We use L<A3C::DefaultACL> for access con Line 225  We use L<A3C::DefaultACL> for access con
225    
226  use A3C::DefaultACL;  use A3C::DefaultACL;
227    
228    # added to make Jifty::View::Declare::CRUD happy because it
229    # tries to capitalize first letter of model creating
230    # A3C::Model::HrEduOrg which is invalid
231    sub object_type { 'A3C::Model::hrEduOrg' }
232    sub collection_class { 'A3C::Model::hrEduOrgCollection' }
233    
234  1;  1;

Legend:
Removed from v.124  
changed lines
  Added in v.208

  ViewVC Help
Powered by ViewVC 1.1.26