chore: remove upsert-saml-auth-provider mutation
This commit is contained in:
@@ -16,7 +16,6 @@ import updateCurrentUser from './mutations/update-current-user.js';
|
||||
import updateFlowStatus from './mutations/update-flow-status.js';
|
||||
import updateRole from './mutations/update-role.ee.js';
|
||||
import updateStep from './mutations/update-step.js';
|
||||
import upsertSamlAuthProvider from './mutations/upsert-saml-auth-provider.ee.js';
|
||||
import upsertSamlAuthProvidersRoleMappings from './mutations/upsert-saml-auth-providers-role-mappings.ee.js';
|
||||
|
||||
// Converted mutations
|
||||
@@ -45,7 +44,6 @@ const mutationResolvers = {
|
||||
updateRole,
|
||||
updateStep,
|
||||
updateUser,
|
||||
upsertSamlAuthProvider,
|
||||
upsertSamlAuthProvidersRoleMappings,
|
||||
verifyConnection,
|
||||
};
|
||||
|
@@ -1,30 +0,0 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const upsertSamlAuthProvider = async (_parent, params, context) => {
|
||||
context.currentUser.can('create', 'SamlAuthProvider');
|
||||
|
||||
const samlAuthProviderPayload = {
|
||||
...params.input,
|
||||
};
|
||||
|
||||
const existingSamlAuthProvider = await SamlAuthProvider.query()
|
||||
.limit(1)
|
||||
.first();
|
||||
|
||||
if (!existingSamlAuthProvider) {
|
||||
const samlAuthProvider = await SamlAuthProvider.query().insert(
|
||||
samlAuthProviderPayload
|
||||
);
|
||||
|
||||
return samlAuthProvider;
|
||||
}
|
||||
|
||||
const samlAuthProvider = await SamlAuthProvider.query().patchAndFetchById(
|
||||
existingSamlAuthProvider.id,
|
||||
samlAuthProviderPayload
|
||||
);
|
||||
|
||||
return samlAuthProvider;
|
||||
};
|
||||
|
||||
export default upsertSamlAuthProvider;
|
@@ -22,7 +22,6 @@ type Mutation {
|
||||
updateRole(input: UpdateRoleInput): Role
|
||||
updateStep(input: UpdateStepInput): Step
|
||||
updateUser(input: UpdateUserInput): User
|
||||
upsertSamlAuthProvider(input: UpsertSamlAuthProviderInput): SamlAuthProvider
|
||||
upsertSamlAuthProvidersRoleMappings(
|
||||
input: UpsertSamlAuthProvidersRoleMappingsInput
|
||||
): [SamlAuthProvidersRoleMapping]
|
||||
@@ -219,21 +218,6 @@ type Flow {
|
||||
status: FlowStatus
|
||||
}
|
||||
|
||||
type SamlAuthProvider {
|
||||
id: String
|
||||
name: String
|
||||
certificate: String
|
||||
signatureAlgorithm: String
|
||||
issuer: String
|
||||
entryPoint: String
|
||||
firstnameAttributeName: String
|
||||
surnameAttributeName: String
|
||||
emailAttributeName: String
|
||||
roleAttributeName: String
|
||||
active: Boolean
|
||||
defaultRoleId: String
|
||||
}
|
||||
|
||||
type SamlAuthProvidersRoleMapping {
|
||||
id: String
|
||||
samlAuthProviderId: String
|
||||
@@ -265,20 +249,6 @@ input VerifyConnectionInput {
|
||||
id: String!
|
||||
}
|
||||
|
||||
input UpsertSamlAuthProviderInput {
|
||||
name: String!
|
||||
certificate: String!
|
||||
signatureAlgorithm: String!
|
||||
issuer: String!
|
||||
entryPoint: String!
|
||||
firstnameAttributeName: String!
|
||||
surnameAttributeName: String!
|
||||
emailAttributeName: String!
|
||||
roleAttributeName: String!
|
||||
defaultRoleId: String!
|
||||
active: Boolean!
|
||||
}
|
||||
|
||||
input UpsertSamlAuthProvidersRoleMappingsInput {
|
||||
samlAuthProviderId: String!
|
||||
samlAuthProvidersRoleMappings: [SamlAuthProviderRoleMappingInput]
|
||||
|
Reference in New Issue
Block a user