8 |
|
|
9 |
column unit => |
column unit => |
10 |
refers_to Arh::Model::Unit, |
refers_to Arh::Model::Unit, |
11 |
|
label is _("Unit"), |
12 |
is required; |
is required; |
13 |
column material => |
column material => |
14 |
refers_to Arh::Model::Material, |
refers_to Arh::Model::Material, |
15 |
|
label is _("Material"), |
16 |
is required; |
is required; |
17 |
|
|
18 |
}; |
}; |
21 |
|
|
22 |
# Your model-specific methods go here. |
# Your model-specific methods go here. |
23 |
|
|
24 |
sub current_user_can { |
use Arh::DefaultACL; |
|
my ( $self, $action,$item,$name ) = @_; |
|
|
return 1 if $self->current_user->administrator; |
|
|
return 1 if $self->current_user->superuser; |
|
|
return 1 if $action eq 'read'; |
|
|
return 0; |
|
|
} |
|
25 |
|
|
26 |
1; |
1; |
27 |
|
|