Skip to content

Commit

Permalink
Merge pull request #3850 from uselagoon/platformowner-loadUserByIdOrE…
Browse files Browse the repository at this point in the history
…mail
  • Loading branch information
tobybellwood authored Dec 5, 2024
2 parents 630e656 + 27ef93b commit fcc30b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/api/src/resources/user/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export const addPlatformRoleToUser: ResolverFn = async (
) => {
// if user is platform owner
if (adminScopes.platformOwner) {
const user = await models.UserModel.loadUserByIdOrUsername({
const user = await models.UserModel.loadUserByIdOrEmail({
id: R.prop('id', userInput),
email: R.prop('email', userInput),
});
Expand Down Expand Up @@ -538,7 +538,7 @@ export const removePlatformRoleFromUser: ResolverFn = async (
) => {
// if user is platform owner
if (adminScopes.platformOwner) {
const user = await models.UserModel.loadUserByIdOrUsername({
const user = await models.UserModel.loadUserByIdOrEmail({
id: R.prop('id', userInput),
email: R.prop('email', userInput),
});
Expand Down Expand Up @@ -567,4 +567,4 @@ export const removePlatformRoleFromUser: ResolverFn = async (
`Unauthorized: You don't have permission to perform this action`
);
}
};
};

0 comments on commit fcc30b3

Please sign in to comment.