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

Modify autocomplete for ManagedGroups #412

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Oct 25, 2023

  • Optionally allow the user to specify that ManagedGroupAutocomplete should only return groups that are managed by the app using a forwarded value.
  • Modify the GroupGroupMembershipForm to pass only_managed_by_app forwarded value to autocomplete for the parent group.
  • Modify the GroupAccountMembershipForm to pass only_managed_by_app forwarded value to autocomplete for the group.

This allows child groups to be added as members of another group, and also allows workspaces to be shared with them.

Closes #399

The ManagedGroupAutocomplete method did not return groups that were
not managed by the app, which means that we cannot add groups not
managed by the app to other groups or share a workspace with a group
not managed by the app. This is not the intended behavior. Modify
the autocomplete method to have a forwarded value that specifies
whether to return only groups that are managed by the app.
This means that a user can only select a group that is managed by
the app as the parent group for a GroupGroupMembership or the group
for the GroupAccountMembership.
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #412 (3a1975c) into main (649bce5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #412   +/-   ##
=======================================
  Coverage   99.82%   99.82%           
=======================================
  Files         121      121           
  Lines       22872    22882   +10     
=======================================
+ Hits        22833    22843   +10     
  Misses         39       39           
Files Coverage Δ
anvil_consortium_manager/__init__.py 100.00% <100.00%> (ø)
anvil_consortium_manager/forms.py 100.00% <100.00%> (ø)
anvil_consortium_manager/tests/test_views.py 99.92% <100.00%> (+<0.01%) ⬆️
anvil_consortium_manager/views.py 99.86% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@amstilp amstilp merged commit 3d6f9d2 into main Oct 25, 2023
12 checks passed
@amstilp amstilp deleted the bugfix/add-child-group-not-managed-by-app branch October 25, 2023 23:39
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.

Cannot add a child group that is not managed by the app
1 participant