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

fix(): Disable "Log in as this user" when gym doesn't match #631

Merged
merged 1 commit into from
Mar 13, 2021

Conversation

bradsk88
Copy link
Contributor

I'm not the biggest fan of using native tooltips since they're so slow to render.
But I didn't see any other options being used in this project.

Deviated from bootstrap styles because I didn't feel their "disabled" state did
a very good job of communicating that the button is disabled.

I prefer leaving the button in place rather than hiding it so that users know
what is theoretically possible if they configure the system correctly.

  • Tests for the changes have been added (for bug fixes / features)
  • New python code has been linted with with flake8 (flake8 --config .github/linters/.flake8 ./wger)
    and isort (isort)
  • Added yourself to AUTHORS.rst

Before

Button is enabled but takes you to a 404
simplescreenrecorder-2021-03-07_20 45 28

After

Button is disabled and shows a cursor/tooltip

simplescreenrecorder-2021-03-12_23.03.55.mp4

Fixes #585

I'm not the biggest fan of using native tooltips since they're so slow to render.
But I didn't see any other options being used in this project.

Deviated from bootstrap styles because I didn't feel their "disabled" state did
a very good job of communicating that the button is disabled.

I prefer leaving the button in place rather than hiding it so that users know
what is theoretically possible if they configure the system correctly.
@bradsk88
Copy link
Contributor Author

Just noticed if you try to "log in as yourself" as an admin, you get a 403. Happy to make that better in another PR.

@rolandgeider
Copy link
Member

Just noticed if you try to "log in as yourself" as an admin, you get a 403. Happy to make that better in another PR.

🙏🏻

@rolandgeider
Copy link
Member

Thanks for the PR

@rolandgeider rolandgeider merged commit cea9167 into wger-project:master Mar 13, 2021
@rolandgeider rolandgeider added this to the 2.0 milestone Mar 13, 2021
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.

Log in as user functionality produces 403 error
2 participants