Add a mutation to destroy LDAP admin role link records
What does this MR do and why?
Adds a mutation to destroy Authz::LdapAdminRoleLink records
References
Implements [BE] Add graphQL mutation to delete LDAP group ... (#524884 - closed).
Screenshots or screen recordings
How to set up and validate locally
-
Enable relevant feature flags and seed some data:
> Feature.enable(:custom_admin_roles) # Create an Authz::LdapAdminRoleLink. Take note of its global id > user_member_role = FactoryBot.create(:admin_member_role) > link = FactoryBot.create(:ldap_admin_role_link, member_role: user_member_role.member_role) > GitlabSchema.id_from_object(_) => #<GlobalID:0x0000000325e57310 @uri=#<URI::GID gid://gitlab/Authz::LdapAdminRoleLink/2>> -
Log-in as admin and navigate to
/-/graphql-explorerand run a query similar to the following (change theid):mutation { ldapAdminRoleLinkDestroy(input: { id: "gid://gitlab/Authz::LdapAdminRoleLink/2" }) { errors ldapAdminRoleLink { id } } } -
Verify that the record has been deleted
> Authz::LdapAdminRoleLink.find(2) ActiveRecord::RecordNotFound: Couldn't find Authz::LdapAdminRoleLink with 'id'=2
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Eugie Limpin
