Is your feature request related to a problem? Please describe.
At the moment we have the RequireUser graphql middleware that checks for a user in the current request scope and returns 403 in case no user was found.
Describe the solution you'd like
We need similar new middleware for the following general situations:
Module
Use case
RequireAnonymous
for operations that are only meant for anonymous access (eg, signup)
RequireGroupMember
for operations that require that the user is a member of the current group
RequireGroupAdmin
for operations that require a user that is an admin in the current group
RequireDaAdmin
for operations that are only allowed for distribute aid admins
These middlewares can then be composed together into more complex middlewares for more specific use cases.
Is your feature request related to a problem? Please describe.
At the moment we have the
RequireUser
graphql middleware that checks for a user in the current request scope and returns 403 in case no user was found.Describe the solution you'd like
We need similar new middleware for the following general situations:
RequireAnonymous
RequireGroupMember
RequireGroupAdmin
RequireDaAdmin
These middlewares can then be composed together into more complex middlewares for more specific use cases.