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

Make anonymous reporting configurable #3132

Closed
miketaylr opened this issue Jan 6, 2020 · 3 comments
Closed

Make anonymous reporting configurable #3132

miketaylr opened this issue Jan 6, 2020 · 3 comments
Assignees

Comments

@miketaylr
Copy link
Member

In #3121 and other places I was pretty hacky about turning this off (just commenting it out, or ripping things out).

I think we could have a config option in https://github.com/webcompat/webcompat.com/blob/master/config/__init__.py, something like ENABLE_ANONYMOUS_REPORTS and set it to False.

Then we can update tests to handle both scenarios, and check the config option before returning 400 here: https://github.com/webcompat/webcompat.com/blob/master/webcompat/issues.py#L27-L34.

I guess we could also control the button's state and text in the template too.

@miketaylr miketaylr self-assigned this Jan 6, 2020
@miketaylr
Copy link
Member Author

I'm gonna stick this in environment.py so we can test out staging differently than production, so we'll need to remember to add STAGING_ANON_REPORTING_ENABLED and PROD_ANON_REPORTING_ENABLED environment variables to the relevant uwsgi configs: https://github.com/webcompat/devops/issues/100

miketaylr pushed a commit that referenced this issue Jan 6, 2020
miketaylr pushed a commit that referenced this issue Jan 6, 2020
…reports

If not set to something truthy, return a 400
miketaylr pushed a commit that referenced this issue Jan 6, 2020
miketaylr pushed a commit that referenced this issue Jan 6, 2020
@miketaylr
Copy link
Member Author

I think to keep things simple, let's limit the scope of this bug to the backend. Not sure it's worth making the frontend as flexible right now -- but when we need to re-enable it, here's the relevant patch to study: 524e130

@miketaylr
Copy link
Member Author

Not sure it's worth making the frontend as flexible right now -- but when we need to re-enable it, here's the relevant patch to study: 524e130

I just went and made the changes, it only took 5 minutes.

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

No branches or pull requests

1 participant