[ ] Affected Issues have been mentioned in the Closing issues section
[ ] Documentation has been written/updated
[ ] PR title is ready for inclusion in changelog
Database Migrations
[ ] If your PR contains a database migation, it MUST be the latest in date order alphabetically
The old process of adding a user as an owner of an organization was previously an owner flag, then with #3733 added admin. This is now different to other things that have a role concept.
This PR introduces a new OrganizationRole type and 2 new mutations that deprecate the older functions with the new types.
Both old and new can still be used, but the recommendation would be to use the new ones for simplicity.
Changes
addUserToOrganization -> addAdminToOrganization
The organization input is now an id or name input, either can be specified
General Checklist
Database Migrations
The old process of adding a user as an owner of an organization was previously an
owner
flag, then with #3733 addedadmin
. This is now different to other things that have arole
concept.This PR introduces a new OrganizationRole type and 2 new mutations that deprecate the older functions with the new types. Both old and new can still be used, but the recommendation would be to use the new ones for simplicity.
Changes
addUserToOrganization
->addAdminToOrganization
organization
input is now anid
orname
input, either can be specifiedrole
input is an ENUM ofVIEWER
,ADMIN
,OWNER
removeUserFromOrganization
->removeAdmimFromOrganization
organization
input is now anid
orname
input, either can be specifiedOrgUser
type now hasorganizationRole
which will return the users roleadmin
andowner
fields are deprecated, but still populated for backwards compatability