/[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

lib/A3C/Model/User.pm revision 35 by dpavlin, Tue Mar 18 19:58:34 2008 UTC lib/A3C/Model/Person.pm revision 70 by dpavlin, Thu Apr 10 20:26:45 2008 UTC
# Line 1  Line 1 
1  use strict;  use strict;
2  use warnings;  use warnings;
3    
4  package A3C::Model::User;  package A3C::Model::Person;
5  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
6    
7  use utf8;  use utf8;
# Line 88  use A3C::Record schema { Line 88  use A3C::Record schema {
88                  label is _('Tip administratora'),                  label is _('Tip administratora'),
89                  valid are [ '', 'AS', 'AI', 'AR', 'AHU' ];                  valid are [ '', 'AS', 'AI', 'AR', 'AHU' ];
90    
91            column hrEduPersonHomeOrg =>
92                    label is _('Oznaka matične ustanove'),
93                    hint is 'CARNet',
94                    is mandatory;
95    
96          column hrEduPersonProfessionalStatus =>          column hrEduPersonProfessionalStatus =>
97                  label is _('Stručni status'),                  label is _('Stručni status'),
98                  valid are [                  valid are [
# Line 148  use A3C::Record schema { Line 153  use A3C::Record schema {
153                  ],                  ],
154                  default is '';                  default is '';
155    
156          column organization =>          column 'o';
157                  refers_to A3C::Model::Organization by 'id',          column 'l';
158                  is mandatory;          column 'postalAddress';
159    
160    #       column organization =>
161    #               refers_to A3C::Model::Organization by 'id',
162    #               is mandatory;
163    
164          column hrEduPersonAffiliation =>          column hrEduPersonAffiliation =>
165                  label is _('Povezanost s ustanovom'),                  label is _('Povezanost s ustanovom'),
# Line 275  use A3C::Record schema { Line 284  use A3C::Record schema {
284                  label is _('Oznaka privatnosti');                  label is _('Oznaka privatnosti');
285    
286          column loginShell =>          column loginShell =>
287                  label is _('shell');                  label is _('login shell');
288    
289          column uidNumber =>          column uidNumber =>
290                  label is _('uid'),                  label is _('uid number'),
291                  type is 'int';                  type is 'int';
292    
293          column gidNumber =>          column gidNumber =>
294                  label is _('gid');                  label is _('gid number');
295                  type is 'int';                  type is 'int';
296    
297          column homeDirectory =>          column homeDirectory =>
298                  label is _('home');                  label is _('home directory');
299    
300  };  };
301    
# Line 329  sub email { Line 338  sub email {
338    
339  sub email_confirmed { 1 };  sub email_confirmed { 1 };
340    
341    =head2 name
342    
343    =cut
344    
345    sub name {
346            my $self = shift;
347            return $self->__value('cn') . ' <' . $self->__value('mail') . '>';
348    }
349    
350  =head2 validate_telephoneNumber  =head2 validate_telephoneNumber
351    
352  =cut  =cut
# Line 341  sub validate_telephoneNumber { Line 359  sub validate_telephoneNumber {
359          return ( 1, 'OK' );          return ( 1, 'OK' );
360  }  }
361    
362  =head hrEduPersonUniqueNumber  =head2 hrEduPersonUniqueNumber
363    
364  Check if JMBG is valid  Check if JMBG is valid
365    
# Line 398  sub canonicalize_hrEduPersonExpireDate { Line 416  sub canonicalize_hrEduPersonExpireDate {
416          return $value;          return $value;
417  }  }
418    
419  =head2 current_user_can  use A3C::DefaultACL;
   
 =cut  
   
 sub current_user_can {  
         # FIXME no security for now :-)  
         return 1;  
 }  
420    
421  1;  1;
422    

Legend:
Removed from v.35  
changed lines
  Added in v.70

  ViewVC Help
Powered by ViewVC 1.1.26