/[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 77 by dpavlin, Fri Apr 11 22:02:09 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 9  use utf8; Line 9  use utf8;
9  use A3C::Record schema {  use A3C::Record schema {
10    
11          column uid =>          column uid =>
12                  label is ('uid'),                  label is _('UID'),
13                  is indexed,                  is indexed,
14                  is mandatory,                  is mandatory,
15                  is distinct;                  is distinct;
16    
17          column hrEduPersonUniqueID =>          column hrEduPersonUniqueID =>
18                  label is ('hrEduPersonUniqueID'),                  label is _('hr Edu Person Unique ID'),
19                  is indexed,                  is indexed,
20                  is distinct,                  is distinct,
21                  is mandatory;                  is mandatory;
# Line 36  use A3C::Record schema { Line 36  use A3C::Record schema {
36                  type is 'text',                  type is 'text',
37                  is mandatory,                  is mandatory,
38                  label is _('Email address'), default is '',                  label is _('Email address'), default is '',
39                    is indexed,
40                  is immutable,                  is immutable,
41                  is distinct;                  is distinct;
42    
# Line 88  use A3C::Record schema { Line 89  use A3C::Record schema {
89                  label is _('Tip administratora'),                  label is _('Tip administratora'),
90                  valid are [ '', 'AS', 'AI', 'AR', 'AHU' ];                  valid are [ '', 'AS', 'AI', 'AR', 'AHU' ];
91    
92            column hrEduPersonHomeOrg =>
93                    label is _('Oznaka matične ustanove'),
94                    hint is 'CARNet',
95                    is mandatory;
96    
97          column hrEduPersonProfessionalStatus =>          column hrEduPersonProfessionalStatus =>
98                  label is _('Stručni status'),                  label is _('Stručni status'),
99                  valid are [                  valid are [
# Line 148  use A3C::Record schema { Line 154  use A3C::Record schema {
154                  ],                  ],
155                  default is '';                  default is '';
156    
157          column organization =>          column 'o' =>
158                  refers_to A3C::Model::Organization by 'id',                  is indexed;
159                  is mandatory;  
160            column 'l';
161            column 'postalAddress';
162            column 'postalCode';
163            column 'street';
164    
165    #       column organization =>
166    #               refers_to A3C::Model::Organization by 'id',
167    #               is mandatory;
168    
169          column hrEduPersonAffiliation =>          column hrEduPersonAffiliation =>
170                  label is _('Povezanost s ustanovom'),                  label is _('Povezanost s ustanovom'),
# Line 275  use A3C::Record schema { Line 289  use A3C::Record schema {
289                  label is _('Oznaka privatnosti');                  label is _('Oznaka privatnosti');
290    
291          column loginShell =>          column loginShell =>
292                  label is _('shell');                  label is _('login shell');
293    
294          column uidNumber =>          column uidNumber =>
295                  label is _('uid'),                  label is _('uid number'),
296                  type is 'int';                  type is 'int';
297    
298          column gidNumber =>          column gidNumber =>
299                  label is _('gid');                  label is _('gid number');
300                  type is 'int';                  type is 'int';
301    
302          column homeDirectory =>          column homeDirectory =>
303                  label is _('home');                  label is _('home directory');
304    
305  };  };
306    
# Line 324  Accessor for compatibility with Jifty mi Line 338  Accessor for compatibility with Jifty mi
338    
339  sub email {  sub email {
340          my $self = shift;          my $self = shift;
341          return $self->__value('mail');          return $self->mail;
342  }  }
343    
344  sub email_confirmed { 1 };  sub email_confirmed { 1 };
345    
346    =head2 name
347    
348    =cut
349    
350    sub name {
351            my $self = shift;
352            return $self->cn . ' <' . $self->mail . '>';
353    }
354    
355  =head2 validate_telephoneNumber  =head2 validate_telephoneNumber
356    
357  =cut  =cut
# Line 341  sub validate_telephoneNumber { Line 364  sub validate_telephoneNumber {
364          return ( 1, 'OK' );          return ( 1, 'OK' );
365  }  }
366    
367  =head hrEduPersonUniqueNumber  =head2 hrEduPersonUniqueNumber
368    
369  Check if JMBG is valid  Check if JMBG is valid
370    
# Line 398  sub canonicalize_hrEduPersonExpireDate { Line 421  sub canonicalize_hrEduPersonExpireDate {
421          return $value;          return $value;
422  }  }
423    
424  =head2 current_user_can  use A3C::DefaultACL;
   
 =cut  
   
 sub current_user_can {  
         # FIXME no security for now :-)  
         return 1;  
 }  
425    
426  1;  1;
427    

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

  ViewVC Help
Powered by ViewVC 1.1.26