Skip to content

Commit 2ac576e

Browse files
dev
1 parent 3d821bd commit 2ac576e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CmsManager.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public function init()
6565
const ROLE_MANGER = 'manager';
6666
const ROLE_EDITOR = 'editor';
6767
const ROLE_USER = 'user';
68-
const ROLE_APPROVED = 'approved';
6968

7069
static public function protectedRoles()
7170
{
@@ -76,7 +75,6 @@ static public function protectedRoles()
7675
static::ROLE_EDITOR,
7776
static::ROLE_USER,
7877
static::ROLE_GUEST,
79-
static::ROLE_APPROVED,
8078
];
8179
}
8280

@@ -104,6 +102,8 @@ public function getAvailableRoles()
104102
}
105103

106104
$result = [];
105+
ArrayHelper::remove($roles, self::ROLE_GUEST);
106+
107107
if (\Yii::$app->user->can(self::PERMISSION_ROOT_ACCESS)) {
108108
return $roles;
109109
}

0 commit comments

Comments
 (0)