Commit 79f29b4ededca799672d2d2605af8907b8a422cf
1 parent
3e67af18
Don't show the folder name in the title if we don't have Folder Details
permission. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5528 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
18 additions
and
2 deletions
browse.php
| ... | ... | @@ -142,7 +142,15 @@ class BrowseDispatcher extends KTStandardDispatcher { |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | $this->oPage->setTitle(_kt('Browse')); |
| 145 | - $this->oPage->setSecondaryTitle($oFolder->getName()); | |
| 145 | + if (KTPermissionUtil::userHasPermissionOnItem($this->oUser, 'ktcore.permissions.folder_details', $oFolder)) { | |
| 146 | + $this->oPage->setSecondaryTitle($oFolder->getName()); | |
| 147 | + } else { | |
| 148 | + if (KTBrowseUtil::inAdminMode($this->oUser, $oFolder)) { | |
| 149 | + $this->oPage->setSecondaryTitle(sprintf('(%s)', $oFolder->getName())); | |
| 150 | + } else { | |
| 151 | + $this->oPage->setSecondaryTitle('...'); | |
| 152 | + } | |
| 153 | + } | |
| 146 | 154 | |
| 147 | 155 | $this->oFolder =& $oFolder; |
| 148 | 156 | if (PEAR::isError($oFolder)) { | ... | ... |
lib/actions/folderaction.inc.php
| ... | ... | @@ -144,7 +144,15 @@ class KTFolderAction extends KTStandardDispatcher { |
| 144 | 144 | $portlet->setActions($aActions,null); |
| 145 | 145 | $this->oPage->addPortlet($portlet); |
| 146 | 146 | |
| 147 | - $this->oPage->setSecondaryTitle($this->oFolder->getName()); | |
| 147 | + if (KTPermissionUtil::userHasPermissionOnItem($this->oUser, 'ktcore.permissions.folder_details', $this->oFolder)) { | |
| 148 | + $this->oPage->setSecondaryTitle($oFolder->getName()); | |
| 149 | + } else { | |
| 150 | + if (KTBrowseUtil::inAdminMode($this->oUser, $oFolder)) { | |
| 151 | + $this->oPage->setSecondaryTitle(sprintf('(%s)', $oFolder->getName())); | |
| 152 | + } else { | |
| 153 | + $this->oPage->setSecondaryTitle('...'); | |
| 154 | + } | |
| 155 | + } | |
| 148 | 156 | |
| 149 | 157 | return true; |
| 150 | 158 | } | ... | ... |