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

Prevent users to fill out confirmation form without being admitted #44

Merged
merged 1 commit into from
Nov 8, 2017

Conversation

xTEddie
Copy link
Contributor

@xTEddie xTEddie commented Oct 31, 2017

Users are able to go the confirmation page through the URL. This PR should fix the issue.

@jlin816 jlin816 merged commit b096249 into techx:master Nov 8, 2017
@jlin816
Copy link
Contributor

jlin816 commented Nov 8, 2017

Thanks @xTEddie !

@chriswongtv
Copy link
Contributor

Correct me if I'm wrong but isn't completedProfile within the status property of the User object that gets set to true when the application is completed (not admitted)? I made a similar fix for HackUCI that uses the User.status.admitted property instead: https://github.com/hackuci/quill/pull/63/files.

@xTEddie
Copy link
Contributor Author

xTEddie commented Nov 9, 2017

@chriswongtv you’re right. Your fix works too!

@chriswongtv
Copy link
Contributor

@xTEddie I've just tested it locally and Session.getUser().completedProfile is always undefined because the completedProfile property does not exist. As a result, !Session.getUser().completedProfile resolves to true and it will always redirect users who's trying to get to the confirmation page to the dashboard (regardless if they are admitted). I tried changing Session.getUser().completedProfile to Session.getUser().status.completedProfile where the property exists, but now anyone who has submitted an application (instead of admitted) has the ability to see the confirmation page and submit the form. Therefore I believe we should be checking the Session.getUser().status.admitted property instead.

@xTEddie
Copy link
Contributor Author

xTEddie commented Nov 10, 2017

I retested it and you're right. It should be Session.getUser().status.completedProfile instead. Looking at the completedProfile status is not enough. Your fix would make more sense. Thanks for pointing this out. You can make a PR on that repo to fix it. Thanks!

@chriswongtv
Copy link
Contributor

@xTEddie Opened #45. Glad we sorted this out!

@jlin816
Copy link
Contributor

jlin816 commented Nov 10, 2017

Oh man, my bad for missing this -- thanks for pointing it out, @chriswongtv 👍

krubenok pushed a commit to hackmcgill/McHacks-Registration that referenced this pull request Dec 21, 2017
Prevent users to fill out confirmation form without being admitted
prabhanshuguptagit pushed a commit to prabhanshuguptagit/quill that referenced this pull request Jan 23, 2019
Prevent users to fill out confirmation form without being admitted
jtviolet pushed a commit to jtviolet/fountain that referenced this pull request Aug 13, 2019
Prevent users to fill out confirmation form without being admitted
jtviolet pushed a commit to jtviolet/fountain that referenced this pull request Aug 13, 2019
Prevent users to fill out confirmation form without being admitted
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