Skip to content

Commit

Permalink
Merge pull request #42 from beatrycze-volk/fix-access
Browse files Browse the repository at this point in the history
[BUGFIX] Fix return type and function name in `KitodoAccessViewHelper`
  • Loading branch information
beatrycze-volk authored Oct 8, 2024
2 parents 4838dbf + 8933eab commit f3e5b25
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Classes/ViewHelpers/KitodoAccessViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use Slub\DigasFeManagement\Domain\Model\User;
use Slub\DigasFeManagement\Domain\Repository\UserRepository;
use Slub\SlubWebDigas\Domain\Model\KitodoDocument;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Object\ObjectManager;
Expand Down Expand Up @@ -113,7 +114,7 @@ public static function renderStatic(array $arguments, \Closure $renderChildrenCl
*/
$currentUser = $userRepository->findByUid($GLOBALS['TSFE']->fe_user->user['uid']);
//get accessible documents of current fe_user
$accessIds = KitodoAccessViewHelper::getKitodoDocmentAccessIdsAsArray($currentUser->getKitodoDocumentAccess());
$accessIds = KitodoAccessViewHelper::getKitodoDocumentAccessIdsAsArray($currentUser->getKitodoDocumentAccess());

return in_array($kitodoDocument['record_id'], $accessIds);
}
Expand All @@ -140,7 +141,7 @@ protected static function getSettings() {
* @param ObjectStorage $kitodoDocumentAccess
* @return array
*/
protected static function getKitodoDocmentAccessIdsAsArray(ObjectStorage $kitodoDocumentAccess) : array
protected static function getKitodoDocumentAccessIdsAsArray(ObjectStorage $kitodoDocumentAccess) : array
{
$accessIds = [];

Expand All @@ -157,7 +158,7 @@ protected static function getKitodoDocmentAccessIdsAsArray(ObjectStorage $kitodo
* fetch dlf document by uid
*
* @param int $uid
* @return void
* @return KitodoDocument
*/
protected static function getDlfDocument(int $uid) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
Expand Down

0 comments on commit f3e5b25

Please sign in to comment.