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; |
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 |
|
|
154 |
], |
], |
155 |
default is ''; |
default is ''; |
156 |
|
|
157 |
|
column 'o'; |
158 |
|
column 'l'; |
159 |
|
column 'postalAddress'; |
160 |
|
|
161 |
# column organization => |
# column organization => |
162 |
# refers_to A3C::Model::Organization by 'id', |
# refers_to A3C::Model::Organization by 'id', |
163 |
# is mandatory; |
# is mandatory; |
285 |
label is _('Oznaka privatnosti'); |
label is _('Oznaka privatnosti'); |
286 |
|
|
287 |
column loginShell => |
column loginShell => |
288 |
label is _('shell'); |
label is _('login shell'); |
289 |
|
|
290 |
column uidNumber => |
column uidNumber => |
291 |
label is _('uid'), |
label is _('uid number'), |
292 |
type is 'int'; |
type is 'int'; |
293 |
|
|
294 |
column gidNumber => |
column gidNumber => |
295 |
label is _('gid'); |
label is _('gid number'); |
296 |
type is 'int'; |
type is 'int'; |
297 |
|
|
298 |
column homeDirectory => |
column homeDirectory => |
299 |
label is _('home'); |
label is _('home directory'); |
300 |
|
|
301 |
}; |
}; |
302 |
|
|
334 |
|
|
335 |
sub email { |
sub email { |
336 |
my $self = shift; |
my $self = shift; |
337 |
return $self->__value('mail'); |
return $self->mail; |
338 |
} |
} |
339 |
|
|
340 |
sub email_confirmed { 1 }; |
sub email_confirmed { 1 }; |
341 |
|
|
342 |
|
=head2 name |
343 |
|
|
344 |
|
=cut |
345 |
|
|
346 |
|
sub name { |
347 |
|
my $self = shift; |
348 |
|
return $self->cn . ' <' . $self->mail . '>'; |
349 |
|
} |
350 |
|
|
351 |
=head2 validate_telephoneNumber |
=head2 validate_telephoneNumber |
352 |
|
|
353 |
=cut |
=cut |
417 |
return $value; |
return $value; |
418 |
} |
} |
419 |
|
|
420 |
=head2 current_user_can |
use A3C::DefaultACL; |
|
|
|
|
=cut |
|
|
|
|
|
sub current_user_can { |
|
|
# FIXME no security for now :-) |
|
|
return 1; |
|
|
} |
|
421 |
|
|
422 |
1; |
1; |
423 |
|
|