@Component
class UserQueries(val gropiusUserRepository: GropiusUserRepository, val authorizationChecker: AuthorizationChecker) : Query

Contains all user-related queries

Parameters

gropiusUserRepository

for getting GropiusUser by id

authorizationChecker

used to check for permissions

Constructors

Link copied to clipboard
constructor(gropiusUserRepository: GropiusUserRepository, authorizationChecker: AuthorizationChecker)

Properties

Link copied to clipboard
private val authorizationChecker: AuthorizationChecker
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun currentUser(dfe: DataFetchingEnvironment): GropiusUser?

The current authenticated user

Link copied to clipboard
suspend fun hasGlobalPermission(dfe: DataFetchingEnvironment, permission: @TypeGraphQLType(name = "PermissionEntry") String): Boolean

Checks if the current user has a specific global permission