mirror of
https://github.com/grafana/grafana.git
synced 2025-02-16 18:34:52 -06:00
* AccessControl: Provide scope to frontend * Covering datasources with accesscontrol metadata * Write benchmark tests for GetResourcesMetadata * Add accesscontrol util and interface * Add the hasPermissionInMetadata function in the frontend access control code * Use IsDisabled rather that performing a feature toggle check Co-authored-by: Karl Persson <kalle.persson@grafana.com>
10 lines
313 B
TypeScript
10 lines
313 B
TypeScript
import config from '../../core/config';
|
|
|
|
// addAccessControlQueryParam appends ?accesscontrol=true to a url when accesscontrol is enabled
|
|
export function addAccessControlQueryParam(url: string): string {
|
|
if (!config.featureToggles['accesscontrol']) {
|
|
return url;
|
|
}
|
|
return url + '?accesscontrol=true';
|
|
}
|