Add the groupToEditPost field to the Collaboration system. This allows users

to specify a group of users that will always be able to do edits on posts,
regardless of whether they own those posts and independent of the editTimeout
field.
This commit is contained in:
Chris Nehren 2007-11-06 22:58:22 +00:00
parent e5b7741f75
commit 0d689afa4c
5 changed files with 220 additions and 4 deletions

View file

@ -96,6 +96,7 @@ sub canEdit {
return (($self->session->form->process("func") eq "add" || ($self->session->form->process("assetId") eq "new" && $self->session->form->process("func") eq "editSave" && $self->session->form->process("class","className") eq "WebGUI::Asset::Post")) && $self->getThread->getParent->canPost) || # account for new posts
($self->isPoster && $self->getThread->getParent->get("editTimeout") > ($self->session->datetime->time() - $self->get("revisionDate"))) ||
$self->session->user->isInGroup($self->getThread->getParent->get('groupToEditPost')) ||
$self->getThread->getParent->canEdit;
}