Confidential Docs
Authentication
View GitHub RSS Feed
Set theme to dark (⇧+D)

Components

We currently use the setFunctionsAndPermissions method to check if the view is available and to check other permissions. In the end this function (and possibly the ScopedComponent in its entirety) will disappear. This means we need a different location to check the available actions. From now on we’ll do this in the html by putting everything inside a . The authorized component takes in one or more actions or an AuthorizedObservable and checks if the user is allowed to perform those actions when loading a component. If not, the component will not load. It is best to use the action of the call that the component does when it loads. Usually this call is defined in de getDatasource, so we use that to determine which action should be checked.

Examples:

<flx-authorized-component [authorizedObservable]="getDatasource()">
... content
</flx-authorized-component>

OR:

<flx-authorized-component [authorizedObservable]="personDetailPageResolver.getResolverService(entityId, entityRegistrationId)">
... content
</flx-authorized-component>