Skip to content

Commit

Permalink
Reverting changes to client grants, better suited for other PR
Browse files Browse the repository at this point in the history
  • Loading branch information
willvedd committed Nov 18, 2023
1 parent 4e5fc57 commit b027153
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions src/context/yaml/handlers/clientGrants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ async function parse(context: YAMLContext): Promise<ParsedClientGrants> {
}

async function dump(context: YAMLContext): Promise<ParsedClientGrants> {
const { clientGrants } = context.assets;
const { clientGrants, clients } = context.assets;

if (!clientGrants) return { clientGrants: null };

const clients = await context.mgmtClient.clients.getAll({
paginate: true,
include_totals: true,
})

// Convert client_id to the client name for readability
return {
clientGrants: clientGrants.map((grant) => {
Expand Down
3 changes: 1 addition & 2 deletions src/context/yaml/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
wrapArrayReplaceMarkersInQuotes,
Auth0,
} from '../../tools';
import pagedClient from '../../tools/auth0/client';

import log from '../../logger';
import { isFile, toConfigFn, stripIdentifiers, formatResults, recordsSorter } from '../../utils';
Expand All @@ -30,7 +29,7 @@ export default class YAMLContext {
this.configFile = config.AUTH0_INPUT_FILE;
this.config = config;
this.mappings = config.AUTH0_KEYWORD_REPLACE_MAPPINGS || {};
this.mgmtClient = pagedClient(mgmtClient);
this.mgmtClient = mgmtClient
this.disableKeywordReplacement = false;

//@ts-ignore because the assets property gets filled out throughout
Expand Down

0 comments on commit b027153

Please sign in to comment.