Commit ed4914560758b47aea465ec19c6a0f64a9529f38

Authored by nbm
1 parent b7c83319

Allow for admins in admin mode to view the document details page


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4936 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 7 additions and 4 deletions
view.php
... ... @@ -66,10 +66,13 @@ class ViewDocumentDispatcher extends KTStandardDispatcher {
66 66 $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.');
67 67 return $this->do_error();
68 68 }
69   - if (!Permission::userHasDocumentReadPermission($oDocument)) {
70   - $this->oPage->addError(_('You are not allowed to view this document'));
71   - return $this->do_error();
72   - }
  69 +
  70 + if (!KTBrowseUtil::inAdminMode($this->oUser, $oDocument->getFolderId())) {
  71 + if (!Permission::userHasDocumentReadPermission($oDocument)) {
  72 + $this->oPage->addError(_('You are not allowed to view this document'));
  73 + return $this->do_error();
  74 + }
  75 + }
73 76  
74 77 $this->oPage->setSecondaryTitle($oDocument->getName());
75 78  
... ...