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

Update UsersController.cs #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bygonaut
Copy link

We should check the requester's rights before making the trip to the db.

check rights before going to database
Copy link

@Berkmann18 Berkmann18 left a comment

Choose a reason for hiding this comment

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

Don't you think that would make the code less efficient?

@AcidRaZor
Copy link

Don't you think that would make the code less efficient?

@Berkmann18
Why would checking if you're an admin first and then make a call to the database to retrieve the user, be less efficient? Currently you call the database first (overhead), and THEN check if the user requesting the information is an admin?

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.

3 participants