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

Quota: Makes LDAP + Quota work for the first login of a new user #21949

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

xlson
Copy link
Contributor

@xlson xlson commented Feb 5, 2020

What this PR does / why we need it:

Fixes bugs related to quota's with LDAP. The first login for a user with LDAP and Quotas enabled would always fail.

Which issue(s) this PR fixes:

Fixes #21947

Special notes for your reviewer:

It was missing for ldap_login which means that the first signup failed
for users with LDAP+quota enabled. There's also potential cases where we
can't provide a request context (background jobs) which is also covered,
but needs a refactoring.
Copy link
Contributor

@marefr marefr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Agree with your comment, but this is fine for now. I find it weird that the UpsertUserCommand handler calls the quota service so maybe should think about if the quota check could be made somewhere else closer to the http request layer?

@papagian papagian merged commit 59530e4 into grafana:master Feb 6, 2020
@xlson
Copy link
Contributor Author

xlson commented Feb 6, 2020

@marefr I think that might be hard, a lot of the qutoas need a better understanding of what will happen than is available in the http layer. It would definitely be nice to make it cleaner if possible though.

alexanderzobnin pushed a commit that referenced this pull request Feb 6, 2020
…#21949)

It was missing for ldap_login which means that the first signup failed
for users with LDAP+quota enabled. There's also potential cases where we
can't provide a request context (background jobs) which is also covered,
but needs a refactoring.

(cherry picked from commit 59530e4)
alexanderzobnin pushed a commit that referenced this pull request Feb 6, 2020
…#21949)

It was missing for ldap_login which means that the first signup failed
for users with LDAP+quota enabled. There's also potential cases where we
can't provide a request context (background jobs) which is also covered,
but needs a refactoring.

(cherry picked from commit 59530e4)
alexanderzobnin added a commit that referenced this pull request Feb 6, 2020
alexanderzobnin added a commit that referenced this pull request Feb 6, 2020
* Change log 6.6.1

* Add PR co-authors

* fix label type for PR #21949

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New login with LDAP+quotas fails with a nilpointer
4 participants