33 |
default is 'false', |
default is 'false', |
34 |
since '0.0.8'; |
since '0.0.8'; |
35 |
|
|
36 |
|
column can_import => |
37 |
|
type is 'boolean', |
38 |
|
label is 'Import request', |
39 |
|
is mandatory, |
40 |
|
default is 'false', |
41 |
|
since '0.0.12'; |
42 |
|
|
43 |
column sources => |
column sources => |
44 |
refers_to Transports::Model::UserOnSourceCollection by 'user_on', |
refers_to Transports::Model::UserOnSourceCollection by 'user_on', |
45 |
label is 'Source systems', |
label is 'Source systems', |
98 |
#Carp::confess if ($right eq 'read' and not $args{'column'}); |
#Carp::confess if ($right eq 'read' and not $args{'column'}); |
99 |
|
|
100 |
if ( $right eq 'read' |
if ( $right eq 'read' |
101 |
and ( $self->id == $self->current_user->id or $self->current_user->admin ) ) |
and ( $self->id == $self->current_user->id or $self->current_user->admin or $self->current_user->can_import ) ) |
102 |
{ |
{ |
103 |
return 1; |
return 1; |
104 |
} elsif ( $right eq 'read' and $args{'column'} eq 'name' ) { |
} elsif ( $right eq 'read' and $args{'column'} eq 'name' ) { |
105 |
return (1); |
return (1); |
106 |
|
|
107 |
} elsif ( $right eq 'update' |
} elsif ( |
108 |
and $self->id == $self->current_user->id |
$right eq 'update' and |
109 |
and $args{'column'} ne 'email_confirmed' ) |
( $self->id == $self->current_user->id or $self->current_user->admin ) |
110 |
{ |
) { |
111 |
return (1); |
return (1); |
112 |
} |
} |
113 |
|
|