This repository was archived by the owner on Sep 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +38
-7
lines changed Expand file tree Collapse file tree 2 files changed +38
-7
lines changed Original file line number Diff line number Diff line change 1
1
CHANGELOG
2
2
=====================
3
3
4
+ v1.1.2
5
+ ---------------------
6
+ * AccessControl filter update default regexp to ^site, in debug mode add gii and debug modules.
7
+
8
+ v1.1.1
9
+ ---------------------
10
+ * Bugfix: Permission Child/Parents boxes cleanup available options from already exists.
11
+ * Bugfix: Permission Child/Parents fixed fatal error on hierarchy loop.
12
+
4
13
v1.1
5
14
---------------------
6
- * Role permission selector now have better UI with real trees .
7
- * Bugfix: Item name validation not allow ' * ' .
15
+ * NEW: Permissions selector as a real Tree-based selector .
16
+ * Bugfix: Fix wrong unique name validations for Role and Permission creating form .
8
17
* Bugfix: Fatal error on creating Role/Permission with existed name.
9
18
19
+ v1.0.2
20
+ ---------------------
21
+ * Bugfix: Routes Scanner take info from comments as well, not class definition.
22
+
10
23
v1.0.1
11
24
---------------------
12
25
* Disable inherit permissions in role permissions selector.
Original file line number Diff line number Diff line change 12
12
class RouteAccessControl extends ActionFilter
13
13
{
14
14
/**
15
- * @var array List of action that not need to check access.
15
+ * List of action that not need to check access.
16
+ *
17
+ * @var array
16
18
*/
17
19
public $ allowActions = [];
18
20
19
21
/**
20
- * @var string Allow route pattern
22
+ * Allow route pattern
23
+ * in debug mode default value is "/^(site|gii|debug)\//i".
24
+ *
25
+ * @var string
21
26
*/
22
- public $ allowRegexp = '/(gii)/i ' ;
27
+ public $ allowRegexp = '/^(site)\//i ' ;
28
+
29
+ /**
30
+ * RouteAccessControl constructor.
31
+ *
32
+ * @param array $config
33
+ */
34
+ public function __construct (array $ config = [])
35
+ {
36
+ if (defined ('YII_DEBUG ' ) && YII_DEBUG ) {
37
+ $ this ->allowRegexp = '/^(site|gii|debug)\//i ' ;
38
+ }
39
+ parent ::__construct ($ config );
40
+ }
23
41
24
42
/**
25
43
* This method is invoked right before an action is to be executed (after all possible filters.)
@@ -45,7 +63,7 @@ public function beforeAction($action)
45
63
}
46
64
47
65
if (in_array ($ action_rule , $ this ->allowActions )
48
- || in_array ($ controller_rule , $ this ->allowActions )
66
+ || in_array ($ controller_rule , $ this ->allowActions )
49
67
) {
50
68
$ allow = true ;
51
69
} else {
@@ -63,7 +81,7 @@ public function beforeAction($action)
63
81
/**
64
82
* Deny access method
65
83
*
66
- * @throws ForbiddenHttpException
84
+ * @throws ForbiddenHttpException Deny exception.
67
85
*/
68
86
public function denyAccess ()
69
87
{
You can’t perform that action at this time.
0 commit comments