propperly check for access right

This commit is contained in:
Uwe Steinmann 2015-06-15 14:17:16 +02:00
parent 4173dbcd20
commit 3b0d239a00
4 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,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

@ -68,7 +68,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

@ -61,7 +61,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

@ -61,7 +61,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"));
}