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 only OpenRosa endpoints with not-validated passwords #887

Conversation

noliveleger
Copy link
Contributor

@noliveleger noliveleger commented Jul 17, 2023

Description

Superusers can flag accounts as not-validated password (i.e. password which don't respect password security rules).
These users can still collect data only until they reset their password and comply to password rules.

Related issues

Related to kobotoolbox/kpi#4475 and kobotoolbox/kpi#4473
Blocked by #886
Closes #881

@noliveleger noliveleger closed this Aug 8, 2023
@noliveleger noliveleger deleted the kobotoolbox/kpi#4475-validate-password-flag branch August 8, 2023 14:37
@noliveleger noliveleger restored the kobotoolbox/kpi#4475-validate-password-flag branch August 8, 2023 14:38
@noliveleger noliveleger reopened this Aug 8, 2023
@magicznyleszek magicznyleszek assigned noliveleger and unassigned jnm Aug 8, 2023
@noliveleger noliveleger force-pushed the kobotoolbox/kpi#4475-validate-password-flag branch from 99ac7c5 to c0b2afd Compare August 8, 2023 18:30
@@ -41,4 +41,4 @@ def process_view(self, request, view, args, kwargs):
if not is_logged_in and (view_name in REDIRECT_IF_NOT_LOGGED_IN):
return HttpResponseRedirect(login_url)

pass
return
Copy link
Member

@jnm jnm Aug 29, 2023

Choose a reason for hiding this comment

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

@noliveleger not that it's a blocker or anything, but is this explicitly needed for some reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH, I really don't remember what I did that 😅 .
No it is absolutely not needed. Python does it for us behind the scene.

Comment on lines +153 to +157
content_type, *_ = response.accepted_media_type.split(';')
except AttributeError:
pass
else:
*_, format_ = content_type.split('/')
Copy link
Member

@jnm jnm Aug 29, 2023

Choose a reason for hiding this comment

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

I learned something new! 🎓
I think this way of considering only the first accepted_media_type isn't totally kosher, but it's fine for this purpose 👌

Base automatically changed from kobotoolbox/kpi#4475-use-default-storage to kobotoolbox/kpi#4475-shrink-kobocat August 30, 2023 01:57
@jnm jnm merged commit e9078e6 into kobotoolbox/kpi#4475-shrink-kobocat Aug 30, 2023
1 check passed
@jnm jnm deleted the kobotoolbox/kpi#4475-validate-password-flag branch August 30, 2023 01:58
@jnm jnm removed the blocked label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants