Skip to content
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

Merged
merged 7 commits into from
Feb 27, 2024

Conversation

jafaripur
Copy link
Contributor

make authManager configurable for user panel when application use another components id instread default authManager.

Q A
Is bugfix? ✔️
New feature? ✔️
Breaks BC?
Tests pass? ✔️
Fixed issues comma-separated list of tickets # fixed by the PR, if any

…h another components ID name instead default authManager.
src/Module.php Outdated Show resolved Hide resolved
@@ -235,7 +236,8 @@ public function save()
$permissionsProvider = null;

try {
$authManager = Yii::$app->getAuthManager();

$authManager = Instance::ensure($this->module->authManager, \yii\rbac\BaseManager::class);
Copy link
Member

@bizley bizley Aug 11, 2021

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).

@bizley bizley added the type:enhancement Enhancement label Aug 11, 2021
@bizley bizley added this to the 2.1.19 milestone Aug 11, 2021
@bizley bizley requested a review from a team August 11, 2021 07:55
Copy link
Contributor Author

@jafaripur jafaripur left a 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>
@samdark
Copy link
Member

samdark commented Aug 11, 2021

@jafaripur would you please add a line for CHANGELOG?

@bizley
Copy link
Member

bizley commented Aug 11, 2021

how about this, can be change to:

$authManger = Yii::$app->get($this->module->authManager, false);

Yes, I think this is good idea.

CHANGELOG.md Outdated Show resolved Hide resolved
@samdark samdark removed this from the 2.1.19 milestone Feb 19, 2022
@samdark samdark merged commit c063a75 into yiisoft:master Feb 27, 2024
10 checks passed
@samdark
Copy link
Member

samdark commented Feb 27, 2024

Thank you!

@samdark samdark added this to the 2.1.26 milestone Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants