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

Add button to reset passcode #64

Merged
merged 9 commits into from
Oct 9, 2020
Merged

Add button to reset passcode #64

merged 9 commits into from
Oct 9, 2020

Conversation

DerGut
Copy link
Contributor

@DerGut DerGut commented Oct 8, 2020

I did some work on #63:
The PR adds a new button to the <TeamDisplayCard />.

Clicking it will generate a new passcode, patch the teams juice-shop deployment with the new hash and return the passcode to the user. The passcode will then be displayed via the old but modified <PasscodeDisplayCard />.

Looking forward to your feedback!

Screenshot 2020-10-08 at 15 40 56

@J12934 J12934 added the enhancement New feature or request label Oct 8, 2020
@J12934 J12934 self-requested a review October 8, 2020 15:12
@J12934
Copy link
Member

J12934 commented Oct 8, 2020

Wow nice 🚀
Will have a closer look later 👍

Copy link
Member

@J12934 J12934 left a comment

Choose a reason for hiding this comment

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

Seems to be working great 👏
If marked some minor spots where you are using sync code where it could be written asynchronously.

One thing we could potentially change to make this more flexible is to change the resetPasscode endpoint to accept the team name as a request argument. This way we could also use the endpoint on the admin page so that an admin can change the passcode of a team.

But this should be flexible enough for now 👍

juice-balancer/src/teams/teams.js Outdated Show resolved Hide resolved
juice-balancer/src/teams/teams.js Outdated Show resolved Hide resolved
juice-balancer/src/teams/teams.js Outdated Show resolved Hide resolved
juice-balancer/src/teams/teams.js Show resolved Hide resolved
@J12934 J12934 self-requested a review October 9, 2020 14:21
@J12934 J12934 merged commit ccb83ba into juice-shop:master Oct 9, 2020
@J12934
Copy link
Member

J12934 commented Oct 9, 2020

Merged and released with v3.8.0

Thanks again, much appropriated 🙌

(I've added the hacktoberfest-accepted label to the pr in case you are participating in that)

@DerGut
Copy link
Contributor Author

DerGut commented Oct 9, 2020

Great, thanks! I started to extend the reset-password endpoint for the admin user too. However, I couldn't really find space in the admin table to display the new code 😄
Perhaps we can track that in #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants