yiisoft / yii2-mongodb

Yii 2 MongoDB extension
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
327 stars 190 forks source link

Look like authManager->update() not working #182

Closed prawee closed 7 years ago

prawee commented 7 years ago

What steps will reproduce the problem?

i'm want to change type of role to permission Exp. from permission to role case

$auth = Yii::$app->authManager;
$roleName = $auth->getRole($model->name);
$permission = $auth->createPermission($model->name);
$permission->description = $model->description;
$auth->update($roleName,$permission);

don't error but data not change.

Q A
Yii version 2.0.11
Yii MongoDB version ^2.1
MongoDB server version 3.4.1
PHP version 7.0.15
Operating system macOs 10.12.3
klimov-paul commented 7 years ago

Unable to reproduce. Update is covered by unit test, which passes successfully: https://github.com/yiisoft/yii2-mongodb/blob/master/tests/rbac/MongoDbManagerTest.php#L115