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

[Bugs] Fix migrations and admin institutional permissions problems #10914

Conversation

Johnetordoff
Copy link
Contributor

Purpose

Fixes two bugs:

  1. Migrations issues cause by ngo.db.utils.ProgrammingError: column "institutional_request_access_enabled" of relation "osf_institution" already exists
  2. When admin permissions are given to QA users it doesn't affiliate them with that institution, leading to permission issues.

Changes

  • rename migrations
  • add line affiliating admins

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

@Johnetordoff Johnetordoff marked this pull request as ready for review January 13, 2025 18:10
@Johnetordoff Johnetordoff changed the title fix migrations and admin institutional permissions problems [Bugs] Fix migrations and admin institutional permissions problems Jan 13, 2025
@Johnetordoff Johnetordoff force-pushed the fix-migration-for-iac branch from dac0fde to 1fbb50d Compare January 13, 2025 18:17
@@ -255,8 +255,9 @@ def form_valid(self, form):
if not osf_user:
raise Http404(f'OSF user with id "{user_id}" not found. Please double check.')

group = Group.objects.filter(name__startswith=f'institution_{target_institution._id}').first()
osf_user.add_or_update_affiliated_institution(target_institution)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Per my discussion with @Johnetordoff , we should not add affiliation to user outside of SSO.

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.

2 participants