Browse code

Fix permissions

Benjamin Roth authored on09/05/2025 10:13:08
Showing1 changed files
... ...
@@ -26,7 +26,8 @@ $GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array
26 26
     'label'                 => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'],
27 27
     'exclude'               => true,
28 28
     'filter'                => true,
29
-    'options'               => array('edit'),
29
+    'options'               => array('edit'=>'edit'),
30
+    'eval'                  => array('multiple'=>true),
30 31
     'reference'             => &$GLOBALS['TL_LANG']['MSC'],
31 32
     'inputType'             => 'checkbox',
32 33
     'sql'                   => "blob NULL"
Browse code

Change copyright comments

Benjamin Roth authored on07/05/2025 10:31:59
Showing1 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 <?php
2 2
 
3 3
 /**
4
- * SecureDownloads for Contao
4
+ * Memberfiles for Contao
5 5
  *
6 6
  * Copyright (c) 2017 Benjamin Roth
7 7
  *
Browse code

Fix truncate sql error by changing sec_dl_access flag

Benjamin Roth authored on11/09/2023 10:38:46
Showing1 changed files
... ...
@@ -26,7 +26,9 @@ $GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array
26 26
     'label'                 => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'],
27 27
     'exclude'               => true,
28 28
     'filter'                => true,
29
+    'options'               => array('edit'),
30
+    'reference'             => &$GLOBALS['TL_LANG']['MSC'],
29 31
     'inputType'             => 'checkbox',
30
-    'sql'                   => "char(1) NOT NULL default ''"
32
+    'sql'                   => "blob NULL"
31 33
 
32 34
 );
Browse code

Fix wrong table name in tl_user_group dca file

Benjamin Roth authored on02/08/2023 12:15:22
Showing1 changed files
... ...
@@ -16,7 +16,7 @@ use Contao\CoreBundle\DataContainer\PaletteManipulator;
16 16
 PaletteManipulator::create()
17 17
     ->addLegend('sec_dl_legend','alexf_legend',PaletteManipulator::POSITION_BEFORE)
18 18
     ->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND)
19
-    ->applyToPalette('default', 'tl_user');
19
+    ->applyToPalette('default', 'tl_user_group');
20 20
 
21 21
 /**
22 22
  * Add fields to tl_user_group
Browse code

Update

Benjamin Roth authored on26/07/2023 15:18:55
Showing1 changed files
... ...
@@ -16,7 +16,7 @@ use Contao\CoreBundle\DataContainer\PaletteManipulator;
16 16
 PaletteManipulator::create()
17 17
     ->addLegend('sec_dl_legend','alexf_legend',PaletteManipulator::POSITION_BEFORE)
18 18
     ->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND)
19
-    ->applyToPalette('default');
19
+    ->applyToPalette('default', 'tl_user');
20 20
 
21 21
 /**
22 22
  * Add fields to tl_user_group
Browse code

Update

Benjamin Roth authored on26/07/2023 13:13:48
Showing1 changed files
... ...
@@ -8,12 +8,15 @@
8 8
  * @license commercial
9 9
  */
10 10
 
11
+use Contao\CoreBundle\DataContainer\PaletteManipulator;
11 12
 
12 13
 /**
13 14
  * Extend a tl_user_group palette
14 15
  */
15
-$GLOBALS['TL_DCA']['tl_user_group']['palettes']['default'] = str_replace(array('{alexf_legend}', '{alexf_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{alexf_legend}', $GLOBALS['TL_DCA']['tl_user_group']['palettes']['default']);
16
-
16
+PaletteManipulator::create()
17
+    ->addLegend('sec_dl_legend','alexf_legend',PaletteManipulator::POSITION_BEFORE)
18
+    ->addField('sec_dl_access','sec_dl_legend',PaletteManipulator::POSITION_APPEND)
19
+    ->applyToPalette('default');
17 20
 
18 21
 /**
19 22
  * Add fields to tl_user_group
... ...
@@ -26,4 +29,4 @@ $GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array
26 29
     'inputType'             => 'checkbox',
27 30
     'sql'                   => "char(1) NOT NULL default ''"
28 31
 
29
-);
30 32
\ No newline at end of file
33
+);
Browse code

Add dcas

Benjamin Roth authored on17/07/2023 12:21:01
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,29 @@
1
+<?php
2
+
3
+/**
4
+ * SecureDownloads for Contao
5
+ *
6
+ * Copyright (c) 2017 Benjamin Roth
7
+ *
8
+ * @license commercial
9
+ */
10
+
11
+
12
+/**
13
+ * Extend a tl_user_group palette
14
+ */
15
+$GLOBALS['TL_DCA']['tl_user_group']['palettes']['default'] = str_replace(array('{alexf_legend}', '{alexf_legend:hide}'), '{sec_dl_legend:hide},sec_dl_access;{alexf_legend}', $GLOBALS['TL_DCA']['tl_user_group']['palettes']['default']);
16
+
17
+
18
+/**
19
+ * Add fields to tl_user_group
20
+ */
21
+$GLOBALS['TL_DCA']['tl_user_group']['fields']['sec_dl_access'] = array
22
+(
23
+    'label'                 => &$GLOBALS['TL_LANG']['tl_user_group']['sec_dl_access'],
24
+    'exclude'               => true,
25
+    'filter'                => true,
26
+    'inputType'             => 'checkbox',
27
+    'sql'                   => "char(1) NOT NULL default ''"
28
+
29
+);
0 30
\ No newline at end of file