Module

FPO.Dto.UserDto

#UserID

type UserID = String

#FullUserDto

newtype FullUserDto

Representation of a user in the application, based on the API's GET /me endpoint.

Constructors

Instances

#getUserEmail

#getUserID

#isUserSuperadmin

#isAdmin

isAdmin :: FullUserDto -> Boolean

Checks if the user is admin of at least one group, or even a superadmin.

#isAdminOf

isAdminOf :: FullUserDto -> Int -> Boolean

Checks if the user is an admin of a specific group. Returns true if the user is an admin of the group with the given ID, detached from the superadmin state of the user.

See isUserSuperadmin for checking if the user is a superadmin.

#getAllAdminRoles

getAllAdminRoles :: FullUserDto -> Array FullUserRoleDto

Returns all admin roles of the user.

#getUserName

Modules