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

allow admin to opt out of CLR #8607

Merged
merged 2 commits into from
Mar 17, 2021
Merged

allow admin to opt out of CLR #8607

merged 2 commits into from
Mar 17, 2021

Conversation

thelostone-mc
Copy link
Member

Description

Untitled

This is duplicate of https://github.com/gitcoinco/web/pulls and uses is_clr_elgible instead of adding a new field cause we had a few support requests asking us to remove their grant from CLR

app/grants/views.py Outdated Show resolved Hide resolved
@thelostone-mc thelostone-mc requested a review from gdixon March 16, 2021 17:43
Copy link
Contributor

@gdixon gdixon left a comment

Choose a reason for hiding this comment

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

Should we be only be setting this state when the grant is active? Otherwise users will be able to mark their grants as eligible before we've approved them?

@@ -1593,6 +1593,9 @@ def grant_edit(request, grant_id):
if not description_rich:
description_rich = description

is_clr_eligible = json.loads(request.POST.get('is_clr_eligible', 'true'))
grant.is_clr_eligible = is_clr_eligible
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we wrap this with if grant.active:?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmm well if a grant is not active -> this endpoint shouldn't be accessible via UI.
So ideally they would not be able to edit their grants right ?

Copy link
Member Author

Choose a reason for hiding this comment

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

changed it anyways to be safer

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