Login
Back to bricks list
Introduction Version

CurrentUserService

Class to manage the current connected user

Use to set and get the user in a session

Functions

CHECK_IS_ADMIN - @classmethod
CHECK_IS_SYSUSER - @classmethod
GET_AND_CHECK_CURRENT_USER - @classmethod

Get the user in the current session, throw an exception if the user does not exists

Return type:
User
GET_CURRENT_USER - @classmethod

Get the user in the current session, return none if the user is not authenticated

Return type:
Optional
SET_CURRENT_USER - @classmethod

Set the user in the current session

Parameters:
NameTypeDefault valueDescription
userUser