Browse code

Allow non admin users to get access to memberfiles per user view

Benjamin Roth authored on12/10/2023 14:45:10
Showing2 changed files
... ...
@@ -102,6 +102,7 @@ $GLOBALS['TL_DCA']['tl_member_secureDownloads'] = array
102 102
         ),
103 103
         'ctime' => array
104 104
         (
105
+            'exclude'               => true,
105 106
             'label' => &$GLOBALS['TL_LANG']['tl_member_secureDownloads']['ctime'],
106 107
             'sorting' => true,
107 108
             'flag' => 6,
... ...
@@ -42,7 +42,7 @@ class MemberListener {
42 42
      */
43 43
     public function onListSecureDownloadsOperationCallback(array $row, ?string $href, string $label, string $title, ?string $icon, string $attributes, string $table, array $rootRecordIds, ?array $childRecordIds, bool $circularReference, ?string $previous, ?string $next, DataContainer $dc)
44 44
     {
45
-        if (!$this->User->isAdmin && !$this->User->hasAccess('edit','sec_dl_access'))
45
+        if (!$this->User->isAdmin && !$this->User->hasAccess('tl_member_secureDownloads::ctime','alexf'))
46 46
         {
47 47
             return '';
48 48
         }