Skip to content

Commit

Permalink
Fix endpointAppContextServices use of calculateEndpointAuthz (#123494)
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares authored Jan 20, 2022
1 parent ee34a7a commit 855bfd3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ export class EndpointAppContextService {

public async getEndpointAuthz(request: KibanaRequest): Promise<EndpointAuthz> {
const fleetAuthz = await this.getFleetAuthzService().fromRequest(request);
return calculateEndpointAuthz(this.getLicenseService(), fleetAuthz);
const userRoles = this.startDependencies?.security.authc.getCurrentUser(request)?.roles ?? [];

return calculateEndpointAuthz(this.getLicenseService(), fleetAuthz, userRoles);
}

public getEndpointMetadataService(): EndpointMetadataService {
Expand Down

0 comments on commit 855bfd3

Please sign in to comment.