use setPrivileges on files instead of doing it manually

This commit is contained in:
Graham Knop 2010-08-14 09:26:46 -05:00
parent 890a94d3d5
commit 04c49fb48e
2 changed files with 2 additions and 6 deletions

View file

@ -583,7 +583,7 @@ sub update {
$self->setStorageLocation;
}
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
$self->getStorageLocation->setPrivileges($self->get("ownerUserId"),$self->get("groupIdView"),$self->get("groupIdEdit"));
$self->setPrivileges;
}
}

View file

@ -45,11 +45,7 @@ ASSET: while (1) {
next ASSET;
}
last ASSET unless $file;
$file->getStorageLocation->setPrivileges(
$file->get('ownerUserId'),
$file->get('groupIdView'),
$file->get('groupIdEdit'),
);
$file->setPrivileges;
}
finish($session);