Skip to content

Commit

Permalink
feat: add PAT resolver security
Browse files Browse the repository at this point in the history
  • Loading branch information
Fsalker committed Apr 8, 2020
1 parent 95558f9 commit 55e7149
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/api-security/src/plugins/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ const plugin: GraphQLSchemaPlugin = {
resolvers: merge(
{
Query: {
security: emptyResolver
security: emptyResolver,
},
Mutation: {
security: emptyResolver
}
security: emptyResolver,
},
},
install.resolvers,
role.resolvers,
group.resolvers,
user.resolvers
)
),
},
security: {
shield: {
Expand All @@ -73,7 +73,7 @@ const plugin: GraphQLSchemaPlugin = {
getRole: hasScope("security:role:crud"),
listRoles: hasScope("security:role:crud"),
getUser: hasScope("security:user:crud"),
listUsers: hasScope("security:user:crud")
listUsers: hasScope("security:user:crud"),
},
SecurityMutation: {
createGroup: hasScope("security:group:crud"),
Expand All @@ -84,10 +84,12 @@ const plugin: GraphQLSchemaPlugin = {
deleteRole: hasScope("security:role:crud"),
createUser: hasScope("security:user:crud"),
updateUser: hasScope("security:user:crud"),
deleteUser: hasScope("security:user:crud")
}
}
}
createPAT: hasScope("security:user:crud"),
updatePAT: hasScope("security:user:crud"),
deletePAT: hasScope("security:user:crud"),
},
},
},
};

export default plugin;

0 comments on commit 55e7149

Please sign in to comment.