propperly check access rights

This commit is contained in:
Uwe Steinmann 2015-06-15 14:20:51 +02:00
parent ae40f72b80
commit 5c43f191ce
4 changed files with 4 additions and 4 deletions

View File

@ -75,7 +75,7 @@ if ($latestContent->getVersion()!=$version) {
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
// verify if document may be approved
if ($accessop->mayApprove()){
if (!$accessop->mayApprove()){
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
}

View File

@ -71,7 +71,7 @@ if ($latestContent->getVersion()!=$version) {
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
// verify if document may be reviewed
if ($accessop->mayReview()){
if (!$accessop->mayReview()){
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("access_denied"));
}

View File

@ -63,7 +63,7 @@ if ($latestContent->getVersion()!=$version) {
}
// verify if document may be approved
if ($accessop->mayApprove()){
if (!$accessop->mayApprove()){
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));
}

View File

@ -63,7 +63,7 @@ if ($latestContent->getVersion()!=$version) {
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
// verify if document may be reviewed
if ($accessop->mayReview()){
if (!$accessop->mayReview()){
UI::exitError(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))),getMLText("access_denied"));
}