Authorized Observables
In order to keep as much SPOD as possible we’ve introduced Authorized Observables, which is an observable with two added fields: action (for a single ApiAction) and actions(an array of ApiActions). Every generated service that returns an observable adds the necessary ApiAction to the observable, so it can be checked elsewhere.
However, to keep an Observable authorized when it changes, we can’t use the normal rxjs methods like forkJoin and pipe(). So you should use the AuthorizedObservableService for those functions:
// Old:
forkJoin([
this.personService.Get(1),
this.personService.Get(2),
]);
// New:
AuthorizedObservableService.authorizedForkJoin([
this.personService.Get(1),
this.personService.Get(2),
]);
// Old:
this.personService.Get(1).pipe(map(data => data));
// New:
AuthorizedObservableService.authorizedPipe(this.personService.Get(1), map(data => data));
forkJoin will add all permissions from the inserted observables and put it in the actions attribure.
One