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

Auth tweak #123

Merged
merged 3 commits into from
Mar 10, 2019
Merged

Auth tweak #123

merged 3 commits into from
Mar 10, 2019

Conversation

hazmat345
Copy link
Contributor

The only real change here is the checking for user update permission. I didn't verify this, but it looked like before this change anybody could have changed any user's username.

There's a slight cost to the change - in the case where a user with USER_UPDATE is updating permissions for another user it'll check for the permission twice. I don't think that's a very expensive check, but if it is we could add a if user_id == str(self.current_user.id): check.

@hazmat345 hazmat345 mentioned this pull request Mar 7, 2019
@loganasherjones
Copy link
Member

Linting is failing. Otherwise, this LGTM

Copy link
Member

@loganasherjones loganasherjones left a comment

Choose a reason for hiding this comment

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

Linting

@codecov
Copy link

codecov bot commented Mar 10, 2019

Codecov Report

❗ No coverage uploaded for pull request base (auth_update@198a629). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##             auth_update     #123   +/-   ##
==============================================
  Coverage               ?   73.74%           
==============================================
  Files                  ?       31           
  Lines                  ?     1786           
  Branches               ?        0           
==============================================
  Hits                   ?     1317           
  Misses                 ?      469           
  Partials               ?        0
Impacted Files Coverage Δ
brew_view/specification.py 83.33% <ø> (ø)
brew_view/controllers/misc_controllers.py 85.71% <ø> (ø)
brew_view/controllers/token_api.py 76.41% <100%> (ø)
brew_view/controllers/users_api.py 65.16% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 198a629...014ec7b. Read the comment docs.

@loganasherjones loganasherjones merged commit 08de821 into auth_update Mar 10, 2019
@loganasherjones loganasherjones deleted the auth_tweak branch March 10, 2019 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants