We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96f2f69 commit ce7781aCopy full SHA for ce7781a
packages/api-security-cognito/src/createCognito.ts
@@ -49,6 +49,7 @@ export const createCognito = <
49
});
50
51
const { getIdentity, getPermissions } = config;
52
+ const isAdminIdentity = config.identityType === "admin";
53
54
return [
55
new ContextPlugin<TContext>(context => {
@@ -95,7 +96,6 @@ export const createCognito = <
95
96
const teams = context.wcp.canUseTeams();
97
context.plugins.register(adminUsersGqlPlugins({ teams }));
98
}),
- installGqlPlugins,
99
- createAdminUsersHooks()
+ isAdminIdentity ? [installGqlPlugins, createAdminUsersHooks()] : []
100
];
101
};
0 commit comments