Skip to content

Commit

Permalink
addressing pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Oct 24, 2023
1 parent b3d8240 commit 0984ebe
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export async function getHasSetupPrivileges({
securityPluginStart: NonNullable<ProfilingPluginStartDeps['security']>;
request: KibanaRequest;
}) {
// If we have a license which doesn't enable security, or we're a legacy user we shouldn't disable any ui capabilities
if (!securityPluginStart.authz.mode.useRbacForRequest(request)) {
return true;
}

const { hasAllRequested } = await securityPluginStart.authz
.checkPrivilegesWithRequest(request)
.globally({
Expand Down

0 comments on commit 0984ebe

Please sign in to comment.