update m240305_042554_init_rbac.php
This commit is contained in:
parent
18515be0b2
commit
dcc7e23bab
@ -20,11 +20,6 @@ class m240305_042554_init_rbac extends Migration
|
||||
$auth->add($user);
|
||||
$auth->add($admin);
|
||||
|
||||
$access_home = $auth->createPermission('accessHome');
|
||||
$access_home->description = '访问文件管理';
|
||||
$auth->add($access_home);
|
||||
|
||||
$auth->addChild($user,$access_home);
|
||||
// 获取所有用户
|
||||
$users = (new Query())
|
||||
->select(['id', 'role'])
|
||||
@ -43,7 +38,7 @@ class m240305_042554_init_rbac extends Migration
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function safeDown()
|
||||
public function safeDown(): void
|
||||
{
|
||||
$auth = Yii::$app->authManager;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user