Commit 8bcb8c51c2b15bbd31e7741560924fe16a6c02ff

Authored by conradverm
1 parent 6c375d9e

WSA-113

"Implement returning of basic permissions returned by get_listing() and document detail."
Fixed.

Committed By: Conrad Vermeulen
Reviewed By: Megan Watson

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8234 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 8 additions and 0 deletions
ktapi/KTAPIDocument.inc.php
@@ -1449,6 +1449,14 @@ class KTAPI_Document extends KTAPI_FolderItem @@ -1449,6 +1449,14 @@ class KTAPI_Document extends KTAPI_FolderItem
1449 if (Permission::userHasDocumentWritePermission($document)) 1449 if (Permission::userHasDocumentWritePermission($document))
1450 { 1450 {
1451 $perms .= 'W'; 1451 $perms .= 'W';
  1452 +
  1453 + $user_id = $_SESSION['userID'];
  1454 + $co_user_id = $document->getCheckedOutUserID();
  1455 +
  1456 + if (!empty($co_user_id) && ($user_id == $co_user_id))
  1457 + {
  1458 + $perms .= 'E';
  1459 + }
1452 } 1460 }
1453 return $perms; 1461 return $perms;
1454 } 1462 }