Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • UserService

Implements

  • OnDestroy

Index

Constructors

Properties

GLOBAL_ROLE_PREFIX: "global_" = 'global_'
_anonymousService: AnonymousService
_anonymousUserChange$: ReplaySubject<User>
_authService: AuthenticationService
_loginCalled: boolean
_publicLoadCalled: boolean
_session: SessionService
_subAnonym: Subscription
_subAuth: Subscription
_user: User
_userChange$: ReplaySubject<User>
_userResource: UserResourceService
_userTransform: UserTransformer

Accessors

  • get anonymousUser(): User
  • get anonymousUser$(): Observable<User>
  • get user$(): Observable<User>

Methods

  • clearUser(): void
  • hasAuthority(authority: string | string[]): boolean
  • Check if user has specified authority.

    Parameters

    • authority: string | string[]

      If provided authority is array of authorities. Method make intersection of the provided authorities and user's authorities. If calculated intersection isn't empty returns true, otherwise false.

    Returns boolean

  • hasRoleById(roleStringId: string): boolean
  • hasRoleByIdentifier(roleIdentifier: string, netIdentifier: string): boolean
  • Checks whether the user has a role with the specified identifier in a process with the specified identifier (any version), or if the role is global (with prefix 'global_').

    Parameters

    • roleIdentifier: string

      identifier (import ID) of the role we want to check

    • netIdentifier: string

      identifier (import ID) of the process the role is defined in

    Returns boolean

  • hasRoleByName(roleName: string, netIdentifier: string): boolean
  • isCurrentUserEmpty(): boolean
  • isUserEmpty(user: User): boolean
  • loadPublicUser(): void
  • loadUser(): void
  • logout(): Observable<object>
  • ngOnDestroy(): void
  • publishAnonymousUserChange(): void
  • publishUserChange(): void
  • reload(): void

Generated using TypeDoc