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

dont let users submit work unless they've started work #2799

Merged
merged 2 commits into from
Nov 13, 2018

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Nov 13, 2018

Description

dont let users submit work unless they've started work

Checklist
  • linter status: 100% pass
  • changes don't break existing behavior
  • commit message follows commit guidelines
Affected core subsystem(s)

fulfill work

Testing

tested it locally

Refers/Fixes

https://gitcoincore.slack.com/archives/CAXQ7PT60/p1542113751027400

@codecov
Copy link

codecov bot commented Nov 13, 2018

Codecov Report

Merging #2799 into master will increase coverage by <.01%.
The diff coverage is 40%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2799      +/-   ##
==========================================
+ Coverage   28.83%   28.84%   +<.01%     
==========================================
  Files         164      164              
  Lines       13125    13130       +5     
  Branches     1755     1756       +1     
==========================================
+ Hits         3785     3787       +2     
- Misses       9233     9235       +2     
- Partials      107      108       +1
Impacted Files Coverage Δ
app/dashboard/views.py 12.95% <33.33%> (+0.07%) ⬆️
app/dashboard/models.py 51.28% <50%> (-0.01%) ⬇️
...eting/management/commands/assemble_leaderboards.py 25.5% <0%> (ø) ⬆️

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 2625644...ec62e5c. Read the comment docs.

@@ -30,5 +30,8 @@ def save_profile(backend, user, response, request, *args, **kwargs):
if handle in settings.BLOCKED_USERS:
raise SuspiciousOperation('You cannot login')

if not user.active:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mbeacom this look ok?

Copy link
Contributor

@mbeacom mbeacom left a comment

Choose a reason for hiding this comment

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

lgtm 🚢 :shipit:

@mbeacom
Copy link
Contributor

mbeacom commented Nov 13, 2018

They should be unable to login if User.active is False already, but this seems like a solid check. 🙌

@mbeacom mbeacom merged commit e34c2b3 into master Nov 13, 2018
@mbeacom mbeacom deleted the kevin/no_submit_work_if_not_started branch November 13, 2018 16:03
@mbeacom mbeacom added backend This needs backend expertise. and removed in progress labels Nov 13, 2018
@mbeacom mbeacom added the bug This is something that isn't working as intended. label Nov 13, 2018
@frankchen07 frankchen07 added the Gitcoin Bounties Gitcoin Bounties label Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This needs backend expertise. bug This is something that isn't working as intended. Gitcoin Bounties Gitcoin Bounties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants