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

Implement extra organization privileges for superusers #5105

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

pacodelcastillolopez
Copy link
Collaborator

@pacodelcastillolopez pacodelcastillolopez commented Mar 4, 2025

Implements two special types of superusers:

  • Superusers that can create top level organizations
  • Superusers that can admin any existing organization and create sub-organizations

Closes AB#1266

User changes

  • None

Superuser changes

  • If given the right superuser type by an admin they are able to create top level organizations or admin any organization+create any sub-organization

Admin changes

  • When creating a superuser position can select three types: regular, can create top level organizations, can edit or create any organization

System admin changes

  • application.yml or anet-dictionary.yml needs change
    Add the following to anet-dictionary.yml:
    fields:
      position:
        superuserType:
          label: Superuser Type
  • db needs migration
  • documentation has changed
  • graphql schema has changed

Checklist

  • described the user behavior in PR body
  • referenced/updated all related issues
  • commits follow a repo#issue: Title title format and these 7 rules
  • commits have a clean history, otherwise PR may be squash-merged
  • added and/or updated unit tests
  • added and/or updated e2e tests
  • added and/or updated data migrations
  • updated documentation
  • resolved all build errors and warnings
  • opened debt issues for anything not resolved here

@pacodelcastillolopez pacodelcastillolopez force-pushed the AB-1266-extra-privileges-for-superusers branch from 1fbb518 to 4e164b5 Compare March 6, 2025 08:29
@pacodelcastillolopez pacodelcastillolopez force-pushed the AB-1266-extra-privileges-for-superusers branch 5 times, most recently from 9f0af26 to e839b1d Compare March 7, 2025 06:27
@pacodelcastillolopez pacodelcastillolopez force-pushed the AB-1266-extra-privileges-for-superusers branch from e839b1d to b454f0e Compare March 7, 2025 06:34

{position.type === Position.TYPE.SUPERUSER && (
<DictionaryField
wrappedComponent={Field}
Copy link
Collaborator

@gjvoosten gjvoosten Mar 10, 2025

Choose a reason for hiding this comment

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

This should be a PreviewField (check the other fields).
You should also retrieve the superuserType field in the GraphQL request.

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.

2 participants