accessControl.ts 306 B

123456789
  1. import config from '../../core/config';
  2. // accessControlQueryParam adds an additional accesscontrol=true param to params when accesscontrol is enabled
  3. export function accessControlQueryParam(params = {}) {
  4. if (!config.rbacEnabled) {
  5. return params;
  6. }
  7. return { ...params, accesscontrol: true };
  8. }