--- lib/Arh/View.pm 2007/11/29 16:40:10 9 +++ lib/Arh/View.pm 2007/11/29 19:04:56 11 @@ -82,6 +82,7 @@ sub unit { my $unit = shift || die "no unit?"; my $a = new_action( class => 'UpdateUnit', record => $unit ); + warn "## current_user = ",dump( current_user ); form { foreach my $f ( qw/name number campaign material dimensions position description chronology location/ ) { if ( $f eq 'material' ) { @@ -91,7 +92,10 @@ render_param( $m => 'name', label => _("Material"), render_mode => 'read' ); } } else { - render_param( $a => $f, render_mode => 'read' ); + my %opt; + $opt{render_mode} = 'read'; # unless + warn "write $f ",$unit->current_user_can('write',$f) ? 'ok' : 'DENIED'; + render_param( $a => $f, %opt ); } } }