-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make authManger() in UserPanel configurable. #459
Conversation
…h another components ID name instead default authManager.
src/panels/UserPanel.php
Outdated
@@ -235,7 +236,8 @@ public function save() | |||
$permissionsProvider = null; | |||
|
|||
try { | |||
$authManager = Yii::$app->getAuthManager(); | |||
|
|||
$authManager = Instance::ensure($this->module->authManager, \yii\rbac\BaseManager::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not add hard requirement for this, we don't have it currently. This logic must be improved, not sure if we should allow building component here, maybe just to take already built one from the main app? (Something to discuss).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about this, can be change to:
$authManger = Yii::$app->get($this->module->authManager, false);
Co-authored-by: Bizley <pawel@positive.codes>
@jafaripur would you please add a line for CHANGELOG? |
Yes, I think this is good idea. |
Thank you! |
make authManager configurable for user panel when application use another components id instread default authManager.