Commit dd38d89cbb31422456a14c9e6d12bad6c6453cad

Authored by Neil Blakey-Milner
1 parent de310ed5

Check _show() to determine if the action is available


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4847 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/actions/documentaction.inc.php
@@ -120,18 +120,7 @@ class KTDocumentAction extends KTStandardDispatcher { @@ -120,18 +120,7 @@ class KTDocumentAction extends KTStandardDispatcher {
120 function check() { 120 function check() {
121 $this->oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']); 121 $this->oDocument =& $this->oValidator->validateDocument($_REQUEST['fDocumentId']);
122 122
123 - if (!is_null($this->_sShowPermission)) {  
124 - $oPermission =& KTPermission::getByName($this->_sShowPermission);  
125 - if (!PEAR::isError($oPermission)) {  
126 - $res = KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPermission, $this->oDocument);  
127 - if (!$res) {  
128 - return false;  
129 - }  
130 - }  
131 - }  
132 -  
133 - // catch non-enabled state.  
134 - if ($this->_disable()) { return false; } 123 + if (!$this->_show()) { return false; }
135 124
136 $aOptions = array( 125 $aOptions = array(
137 "final" => false, 126 "final" => false,