Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add check for permissions to [zoom].
  • Loading branch information
racke committed Aug 16, 2010
1 parent baba26c commit 5f7eeaf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/WellWell/Zoom.pm
Expand Up @@ -170,6 +170,14 @@ sub parse_handler {
if (defined $class && exists $sref->{specs}->{class}->{$class}) {
$sob = $sref->{specs}->{class}->{$class};
$name = $sob->{name} || $class;

if ($sob->{permission}) {
unless (Vend::Tags->acl('check', $sob->{permission})) {
# no permission for this document part
$elt->cut();
return;
}
}

if ($sob->{type} eq 'list') {
$sob->{elts} = [$elt];
Expand Down

0 comments on commit 5f7eeaf

Please sign in to comment.