I have a api method with an Authorize attribute that checks permissions
[Authorize(ReadIndexes)]
public async Task<IActionResult> GetIndexes ()
{
...
}
Is there an equivalent way to decorate a method to check for permissions in Angular so the api call is not carried out if the permissions are not present
##????##
getIndexes(): Observable<Index[]> {
// dont want to check in the method like below
if(checkPerms("ReadIndexes")===true){
...
}
}