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 updateFlowStatus from './mutations/update-flow-status.js';
|
||||||
import updateRole from './mutations/update-role.ee.js';
|
import updateRole from './mutations/update-role.ee.js';
|
||||||
import updateStep from './mutations/update-step.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';
|
import upsertSamlAuthProvidersRoleMappings from './mutations/upsert-saml-auth-providers-role-mappings.ee.js';
|
||||||
|
|
||||||
// Converted mutations
|
// Converted mutations
|
||||||
@@ -45,7 +44,6 @@ const mutationResolvers = {
|
|||||||
updateRole,
|
updateRole,
|
||||||
updateStep,
|
updateStep,
|
||||||
updateUser,
|
updateUser,
|
||||||
upsertSamlAuthProvider,
|
|
||||||
upsertSamlAuthProvidersRoleMappings,
|
upsertSamlAuthProvidersRoleMappings,
|
||||||
verifyConnection,
|
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
|
updateRole(input: UpdateRoleInput): Role
|
||||||
updateStep(input: UpdateStepInput): Step
|
updateStep(input: UpdateStepInput): Step
|
||||||
updateUser(input: UpdateUserInput): User
|
updateUser(input: UpdateUserInput): User
|
||||||
upsertSamlAuthProvider(input: UpsertSamlAuthProviderInput): SamlAuthProvider
|
|
||||||
upsertSamlAuthProvidersRoleMappings(
|
upsertSamlAuthProvidersRoleMappings(
|
||||||
input: UpsertSamlAuthProvidersRoleMappingsInput
|
input: UpsertSamlAuthProvidersRoleMappingsInput
|
||||||
): [SamlAuthProvidersRoleMapping]
|
): [SamlAuthProvidersRoleMapping]
|
||||||
@@ -219,21 +218,6 @@ type Flow {
|
|||||||
status: FlowStatus
|
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 {
|
type SamlAuthProvidersRoleMapping {
|
||||||
id: String
|
id: String
|
||||||
samlAuthProviderId: String
|
samlAuthProviderId: String
|
||||||
@@ -265,20 +249,6 @@ input VerifyConnectionInput {
|
|||||||
id: String!
|
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 {
|
input UpsertSamlAuthProvidersRoleMappingsInput {
|
||||||
samlAuthProviderId: String!
|
samlAuthProviderId: String!
|
||||||
samlAuthProvidersRoleMappings: [SamlAuthProviderRoleMappingInput]
|
samlAuthProvidersRoleMappings: [SamlAuthProviderRoleMappingInput]
|
||||||
|
Reference in New Issue
Block a user