-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
[TASK-82] Feature: Project-level control of anonymous submission #4719
Conversation
…ned to anonymous user
Conflicts: jsapp/js/account/accountSettingsRoute.tsx
Add submissions
permission assignment to anonymous user
Add submissions
permission assignment to anonymous userAdd submissions
permission assignment to anonymous user
Add submissions
permission assignment to anonymous userAdd submissions
permission assignment to anonymous user
Adjust anon submission tooltip layout issue
that it is for Enketo
except (User.extra_details.RelatedObjectDoesNotExist, KeyError): | ||
require_auth = False | ||
require_auth = obj.asset.deployment.xform.require_auth | ||
except (DeploymentNotFound, AttributeError): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of a weird situation, but I guess AttributeError
is needed because it's possible for the xform
property to return None
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly.
'kpi.deployment_backends.backends.MockDeploymentBackend.xform', | ||
MagicMock(), | ||
) as xf_mock: | ||
type(xf_mock).require_auth = PropertyMock(return_value=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wild. If you explain it to me, I might learn something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, you won't learn anything today. It's a wrong try/error mock of a non-existing property (i.e.: MockDeploymentBackend.xform
) but I could not make it work so I added a dummy property xform
to MockDeploymentBackend
.
Long story short: this can be simplified with xf_mock.require_auth = False
31c5143
to
f496808
Compare
f496808
to
e4d6ad3
Compare
Description
Account setting
Require auth to see forms and data
is not used anymore and OpenRosa server URL is updated based on anonymous userAdd submissions
permission.Add submissions
do NOT implyView form
anymore.Additional info
A new environment variable has been introduced
ENKETO_REDIS_MAIN_URL
and must be set.require_auth
field has been removed from reports (Admin and Project views)Notes
OpenRosa server url is modified directly in redis for Enketo to comply Kobocat (new) requirements. i.e.: Projects with required auth are listed at https://kobocat/ and projects which allow anonymous submissions are listed at https://kobocat/
Related issues
Needs kobotoolbox/kobo-install#236
Blocked by
kobotoolbox/kobocat#904