Merge pull request #1738 from automatisch/AUT-849
refactor: rewrite useAdminSamlAuthProviderRoleMappings with RQ
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
|
||||
|
||||
const getSamlAuthProviderRoleMappings = async (_parent, params, context) => {
|
||||
context.currentUser.can('read', 'SamlAuthProvider');
|
||||
|
||||
const samlAuthProvider = await SamlAuthProvider.query()
|
||||
.findById(params.id)
|
||||
.throwIfNotFound();
|
||||
|
||||
const roleMappings = await samlAuthProvider
|
||||
.$relatedQuery('samlAuthProvidersRoleMappings')
|
||||
.orderBy('remote_role_name', 'asc');
|
||||
|
||||
return roleMappings;
|
||||
};
|
||||
|
||||
export default getSamlAuthProviderRoleMappings;
|
@@ -9,7 +9,6 @@ import getDynamicFields from './queries/get-dynamic-fields.js';
|
||||
import getFlow from './queries/get-flow.js';
|
||||
import getFlows from './queries/get-flows.js';
|
||||
import getNotifications from './queries/get-notifications.js';
|
||||
import getSamlAuthProviderRoleMappings from './queries/get-saml-auth-provider-role-mappings.ee.js';
|
||||
import getStepWithTestExecutions from './queries/get-step-with-test-executions.js';
|
||||
import getUsers from './queries/get-users.js';
|
||||
import testConnection from './queries/test-connection.js';
|
||||
@@ -26,7 +25,6 @@ const queryResolvers = {
|
||||
getFlow,
|
||||
getFlows,
|
||||
getNotifications,
|
||||
getSamlAuthProviderRoleMappings,
|
||||
getStepWithTestExecutions,
|
||||
getUsers,
|
||||
testConnection,
|
||||
|
@@ -26,7 +26,6 @@ type Query {
|
||||
getBillingAndUsage: GetBillingAndUsage
|
||||
getConfig(keys: [String]): JSONObject
|
||||
getNotifications: [Notification]
|
||||
getSamlAuthProviderRoleMappings(id: String!): [SamlAuthProvidersRoleMapping]
|
||||
getUsers(limit: Int!, offset: Int!): UserConnection
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user