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 11CHANGELOG
22=====================
33
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+
413v1.1
514---------------------
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 .
817* Bugfix: Fatal error on creating Role/Permission with existed name.
918
19+ v1.0.2
20+ ---------------------
21+ * Bugfix: Routes Scanner take info from comments as well, not class definition.
22+
1023v1.0.1
1124---------------------
1225* Disable inherit permissions in role permissions selector.
Original file line number Diff line number Diff line change 1212class RouteAccessControl extends ActionFilter
1313{
1414/**
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
1618 */
1719public $ allowActions = [];
1820
1921/**
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
2126 */
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+ }
2341
2442/**
2543 * This method is invoked right before an action is to be executed (after all possible filters.)
@@ -45,7 +63,7 @@ public function beforeAction($action)
4563}
4664
4765if (in_array ($ action_rule , $ this ->allowActions )
48- || in_array ($ controller_rule , $ this ->allowActions )
66+ || in_array ($ controller_rule , $ this ->allowActions )
4967) {
5068$ allow = true ;
5169} else {
@@ -63,7 +81,7 @@ public function beforeAction($action)
6381/**
6482 * Deny access method
6583 *
66- * @throws ForbiddenHttpException
84+ * @throws ForbiddenHttpException Deny exception.
6785 */
6886public function denyAccess ()
6987{
You can’t perform that action at this time.
0 commit comments