mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 22:57:40 +08:00 
			
		
		
		
	Update security-authorization.md
This commit is contained in:
		@ -646,7 +646,11 @@ class UserGroupRule extends Rule
 | 
				
			|||||||
        return false;
 | 
					        return false;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					然后按 [in the previous section](#generating-rbac-data) 中的说明创建自己的 command/migration:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```php
 | 
				
			||||||
$auth = Yii::$app->authManager;
 | 
					$auth = Yii::$app->authManager;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$rule = new \app\rbac\UserGroupRule;
 | 
					$rule = new \app\rbac\UserGroupRule;
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user