Skip to content

Commit

Permalink
fix(OpenRosa): assign default openrosa model-level permissions to t…
Browse files Browse the repository at this point in the history
…he correct database (#5413)

Fixes a 500 error when attempting to create an account on certain
servers, e.g. the Global KoboToolbox instance (kf.kobotoolbox.org).

This is a critical fix, so please excuse the terseness of this
description.
  • Loading branch information
jnm authored Jan 8, 2025
1 parent 3b59a4a commit 0666f7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kpi/deployment_backends/kc_access/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ def grant_kc_model_level_perms(user: 'kobo_auth.User'):
'Searched for content types {}.'.format(content_types)
)

user.user_permissions.add(*permissions_to_assign)
with use_db(settings.OPENROSA_DB_ALIAS):
user.user_permissions.add(*permissions_to_assign)


def set_kc_anonymous_permissions_xform_flags(
Expand Down

0 comments on commit 0666f7b

Please sign in to comment.