Commit d6ec0f7096aa71e63cc4364b815af0f3ee13ba99
1 parent
430f8dcf
Merged in from DEV trunk...
KTS-3342 ""Resolved permissions per user" shows all users in the system (i.e. not only users which have permissions assigned) in version 3.5.2 (SUP-638)" Fixed. Replaced the array of all users with only active users when displaying them in the template. Committed by: Megan Watson Reviewed by: Jonathan Byrne git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.2c-Release-Branch@8438 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
4 additions
and
4 deletions
plugins/ktcore/folder/Permissions.php
| @@ -218,6 +218,7 @@ class KTFolderPermissionsAction extends KTFolderAction { | @@ -218,6 +218,7 @@ class KTFolderPermissionsAction extends KTFolderAction { | ||
| 218 | if ($everyone || ($authenticated && $oUser->isAnonymous()) || | 218 | if ($everyone || ($authenticated && $oUser->isAnonymous()) || |
| 219 | KTPermissionUtil::userHasPermissionOnItem($oUser, $oPermission, $this->oFolder)){ | 219 | KTPermissionUtil::userHasPermissionOnItem($oUser, $oPermission, $this->oFolder)){ |
| 220 | $aMapPermissionUser[$iPermissionID][$oUser->getId()] = true; | 220 | $aMapPermissionUser[$iPermissionID][$oUser->getId()] = true; |
| 221 | + $aActiveUsers[$oUser->getId()] = $oUser->getName(); | ||
| 221 | } | 222 | } |
| 222 | } | 223 | } |
| 223 | } | 224 | } |
| @@ -227,7 +228,7 @@ class KTFolderPermissionsAction extends KTFolderAction { | @@ -227,7 +228,7 @@ class KTFolderPermissionsAction extends KTFolderAction { | ||
| 227 | $groups = array(); | 228 | $groups = array(); |
| 228 | $roles = array(); // should _always_ be empty, barring a bug in permissions::updatePermissionLookup | 229 | $roles = array(); // should _always_ be empty, barring a bug in permissions::updatePermissionLookup |
| 229 | 230 | ||
| 230 | - $users = $aUsers; | 231 | + $users = $aActiveUsers; |
| 231 | asort($users); // ascending, per convention. | 232 | asort($users); // ascending, per convention. |
| 232 | 233 | ||
| 233 | $bEdit = false; | 234 | $bEdit = false; |
templates/ktcore/folder/resolved_permissions_user.smarty
| @@ -30,9 +30,8 @@ this folder.{/i18n}</p> | @@ -30,9 +30,8 @@ this folder.{/i18n}</p> | ||
| 30 | </thead> | 30 | </thead> |
| 31 | <tbody> | 31 | <tbody> |
| 32 | 32 | ||
| 33 | -{ foreach item=oUser from=$users } | ||
| 34 | -<td><span class="descriptiveText">{i18n}User: {/i18n}</span> {$oUser->getName()}</td> | ||
| 35 | - { assign var=iUserId value=$oUser->getId() } | 33 | +{ foreach item=sUserName key=iUserId from=$users } |
| 34 | +<td><span class="descriptiveText">{i18n}User: {/i18n}</span> {$sUserName}</td> | ||
| 36 | { foreach item=oPerm from=$permissions } | 35 | { foreach item=oPerm from=$permissions } |
| 37 | { assign var=iPermId value=$oPerm->getId() } | 36 | { assign var=iPermId value=$oPerm->getId() } |
| 38 | { assign var=bHasPerm value=$aMapPermissionUser[$iPermId][$iUserId] } | 37 | { assign var=bHasPerm value=$aMapPermissionUser[$iPermId][$iUserId] } |