Interface IUseUserResult<TSessionProp>

Result of an useUser() hook.

interface IUseUserResult<TSessionProp> {
    displayName: Nullable<string>;
    groups: string[];
    hasGroup: UseUserHasGroupPredicate;
    hasPermission: UseUserHasPermissionPredicate;
    hasRole: UseUserHasRolePredicate;
    permissions: string[];
    photoUrl: Nullable<string>;
    roles: string[];
    session: Nullable<TSessionProp>;
}

Type Parameters

Properties

displayName: Nullable<string>

The display name of the user, if available.

groups: string[]

The list of groups the user belongs to. If no user is logged, this array is empty.

Checks for groups of current user. Alsways false if there is no user.

Checks for permissions of current user. Alsways false if there is no user.

Checks for roles of current user. Alsways false if there is no user.

permissions: string[]

The list of permissions the user belongs to. If no user is logged, this array is empty.

photoUrl: Nullable<string>

The URL of the avatar of the current user. null if there is no user.

roles: string[]

The list of roles the user belongs to. If no user is logged, this array is empty.

session: Nullable<TSessionProp>

The current user session, if available.

Generated using TypeDoc