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

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

revision 15 by dpavlin, Thu Mar 13 17:33:45 2008 UTC revision 16 by dpavlin, Thu Mar 13 18:07:28 2008 UTC
# Line 8  use utf8; Line 8  use utf8;
8    
9  use A3C::Record schema {  use A3C::Record schema {
10    
11            column uid =>
12                    label is ('uid'),
13                    is indexed,
14                    is mandatory,
15                    is distinct;
16    
17            column hrEduPersonUniqueID =>
18                    label is ('hrEduPersonUniqueID'),
19                    is indexed,
20                    is mandatory,
21                    is distinct;
22    
23          column name =>          column name =>
24                  type is 'text',                  type is 'text',
25                  label is _('Ime'),                  label is _('Ime'),
# Line 27  use A3C::Record schema { Line 39  use A3C::Record schema {
39                  label is _('Ime'),                  label is _('Ime'),
40                  is mandatory;                  is mandatory;
41    
42            column mail =>
43                    type is 'virtual';
44    
45          column email =>          column email =>
46                  type is 'text',                  type is 'text',
47                  is mandatory,                  is mandatory,
# Line 66  use A3C::Record schema { Line 81  use A3C::Record schema {
81          column hrEduPersonDateOfBirth =>          column hrEduPersonDateOfBirth =>
82                  type is 'date',                  type is 'date',
83                  render as 'date',                  render as 'date',
84                  label is _('Datum rođenja');                  label is _('Datum rođenja'),
85                    filters are 'Jifty::DBI::Filter::Date';
86    
87          column hrEduPersonGender =>          column hrEduPersonGender =>
88                  label is _('Spol');                  label is _('Spol');
# Line 190  use A3C::Record schema { Line 206  use A3C::Record schema {
206                  type is 'date',                  type is 'date',
207                  render as 'date',                  render as 'date',
208                  is mandatory,                  is mandatory,
209                    filters are 'Jifty::DBI::Filter::Date';
210    
211          column hrEduPersonTitle =>          column hrEduPersonTitle =>
212                  label is 'Položaj u ustanovi',                  label is 'Položaj u ustanovi',
# Line 300  use Jifty::Plugin::ActorMetadata::Mixin: Line 317  use Jifty::Plugin::ActorMetadata::Mixin:
317    
318  # Your model-specific methods go here.  # Your model-specific methods go here.
319    
320    =head2 set_mail
321    
322    Put mail from ldap into email row
323    
324    =cut
325    
326    sub set_mail {
327            my ($self,$v) = @_;
328            $self->set_email( $v );
329    }
330    
331  =head2 validate_telephoneNumber  =head2 validate_telephoneNumber
332    
333  =cut  =cut
# Line 312  sub validate_telephoneNumber { Line 340  sub validate_telephoneNumber {
340          return ( 1, 'OK' );          return ( 1, 'OK' );
341  }  }
342    
343    =head2 canonicalize_hrEduPersonExpireDate
344    
345    Support NONE as 2042-12-30
346    
347    =cut
348    
349    sub canonicalize_hrEduPersonExpireDate {
350            my ( $self, $value ) = @_;
351    
352            if ( $value eq 'NONE' ) {
353                    $self->log->warn("fixed hrEduPersonExpireDate");
354                    $value = '2042-12-30';
355            }
356    
357            return $value;
358    }
359    
360    =head2 current_user_can
361    
362    =cut
363    
364  sub current_user_can {  sub current_user_can {
365          # FIXME no security for now :-)          # FIXME no security for now :-)
366          return 1;          return 1;

Legend:
Removed from v.15  
changed lines
  Added in v.16

  ViewVC Help
Powered by ViewVC 1.1.26