mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Enable None
role for 10.2 (#76343)
* remove the feature toggle for noBasicRole * linting * remove unused
This commit is contained in:
parent
87ff5b66ea
commit
38cdce526a
@ -131,7 +131,6 @@ Experimental features might be changed or removed without prior notice.
|
||||
| `featureToggleAdminPage` | Enable admin page for managing feature toggles from the Grafana front-end |
|
||||
| `permissionsFilterRemoveSubquery` | Alternative permission filter implementation that does not use subqueries for fetching the dashboard folder |
|
||||
| `influxdbSqlSupport` | Enable InfluxDB SQL query language support with new querying UI |
|
||||
| `noBasicRole` | Enables a new role that has no permissions by default |
|
||||
| `angularDeprecationUI` | Display new Angular deprecation-related UI features |
|
||||
| `dashgpt` | Enable AI powered features in dashboards |
|
||||
| `sseGroupByDatasource` | Send query to the same datasource in a single request when using server side expressions |
|
||||
|
@ -117,7 +117,6 @@ export interface FeatureToggles {
|
||||
prometheusConfigOverhaulAuth?: boolean;
|
||||
configurableSchedulerTick?: boolean;
|
||||
influxdbSqlSupport?: boolean;
|
||||
noBasicRole?: boolean;
|
||||
alertingNoDataErrorExecution?: boolean;
|
||||
angularDeprecationUI?: boolean;
|
||||
dashgpt?: boolean;
|
||||
|
@ -687,14 +687,6 @@ var (
|
||||
Owner: grafanaObservabilityMetricsSquad,
|
||||
RequiresRestart: false,
|
||||
},
|
||||
{
|
||||
Name: "noBasicRole",
|
||||
Description: "Enables a new role that has no permissions by default",
|
||||
Stage: FeatureStageExperimental,
|
||||
FrontendOnly: true,
|
||||
Owner: grafanaAuthnzSquad,
|
||||
RequiresRestart: true,
|
||||
},
|
||||
{
|
||||
Name: "alertingNoDataErrorExecution",
|
||||
Description: "Changes how Alerting state manager handles execution of NoData/Error",
|
||||
|
@ -98,7 +98,6 @@ permissionsFilterRemoveSubquery,experimental,@grafana/backend-platform,false,fal
|
||||
prometheusConfigOverhaulAuth,GA,@grafana/observability-metrics,false,false,false,false
|
||||
configurableSchedulerTick,experimental,@grafana/alerting-squad,false,false,true,false
|
||||
influxdbSqlSupport,experimental,@grafana/observability-metrics,false,false,false,false
|
||||
noBasicRole,experimental,@grafana/grafana-authnz-team,false,false,true,true
|
||||
alertingNoDataErrorExecution,privatePreview,@grafana/alerting-squad,false,false,true,false
|
||||
angularDeprecationUI,experimental,@grafana/plugins-platform-backend,false,false,false,true
|
||||
dashgpt,experimental,@grafana/dashboards-squad,false,false,false,true
|
||||
|
|
@ -403,10 +403,6 @@ const (
|
||||
// Enable InfluxDB SQL query language support with new querying UI
|
||||
FlagInfluxdbSqlSupport = "influxdbSqlSupport"
|
||||
|
||||
// FlagNoBasicRole
|
||||
// Enables a new role that has no permissions by default
|
||||
FlagNoBasicRole = "noBasicRole"
|
||||
|
||||
// FlagAlertingNoDataErrorExecution
|
||||
// Changes how Alerting state manager handles execution of NoData/Error
|
||||
FlagAlertingNoDataErrorExecution = "alertingNoDataErrorExecution"
|
||||
|
@ -1,23 +1,15 @@
|
||||
import React from 'react';
|
||||
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Icon, RadioButtonList, Tooltip, useStyles2, useTheme2, PopoverContent } from '@grafana/ui';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { OrgRole } from 'app/types';
|
||||
|
||||
import { getStyles } from './styles';
|
||||
|
||||
const noBasicRoleFlag = contextSrv.licensedAccessControlEnabled();
|
||||
|
||||
const noBasicRole = config.featureToggles.noBasicRole && noBasicRoleFlag;
|
||||
|
||||
const BasicRoleOption: Array<SelectableValue<OrgRole>> = Object.values(OrgRole)
|
||||
.filter((r) => noBasicRole || r !== OrgRole.None)
|
||||
.map((r) => ({
|
||||
label: r === OrgRole.None ? 'No basic role' : r,
|
||||
value: r,
|
||||
}));
|
||||
const BasicRoleOption: Array<SelectableValue<OrgRole>> = Object.values(OrgRole).map((r) => ({
|
||||
label: r === OrgRole.None ? 'No basic role' : r,
|
||||
value: r,
|
||||
}));
|
||||
|
||||
interface Props {
|
||||
value?: OrgRole;
|
||||
|
@ -1,10 +1,8 @@
|
||||
import { css, cx } from '@emotion/css';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
|
||||
import { config } from '@grafana/runtime';
|
||||
import { Button, CustomScrollbar, HorizontalGroup, TextLink, useStyles2, useTheme2 } from '@grafana/ui';
|
||||
import { getSelectStyles } from '@grafana/ui/src/components/Select/getSelectStyles';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { OrgRole, Role } from 'app/types';
|
||||
|
||||
import { BuiltinRoleSelector } from './BuiltinRoleSelector';
|
||||
@ -36,8 +34,7 @@ const fixedRoleGroupNames: Record<string, string> = {
|
||||
current: 'Current org',
|
||||
};
|
||||
|
||||
const noBasicRoleFlag = contextSrv.licensedAccessControlEnabled() && config.featureToggles.noBasicRole;
|
||||
const tooltipMessage = noBasicRoleFlag ? (
|
||||
const tooltipMessage = (
|
||||
<>
|
||||
You can now select the "No basic role" option and add permissions to your custom needs. You can find more
|
||||
information in
|
||||
@ -50,8 +47,6 @@ const tooltipMessage = noBasicRoleFlag ? (
|
||||
</TextLink>
|
||||
.
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
);
|
||||
|
||||
interface RolePickerMenuProps {
|
||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
||||
|
||||
import { locationUtil, SelectableValue } from '@grafana/data';
|
||||
import { Stack } from '@grafana/experimental';
|
||||
import { config, locationService } from '@grafana/runtime';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import {
|
||||
Button,
|
||||
LinkButton,
|
||||
@ -19,13 +19,11 @@ import {
|
||||
Label,
|
||||
} from '@grafana/ui';
|
||||
import { getConfig } from 'app/core/config';
|
||||
import { contextSrv } from 'app/core/core';
|
||||
import { OrgRole, useDispatch } from 'app/types';
|
||||
|
||||
import { addInvitee } from '../invites/state/actions';
|
||||
|
||||
const noBasicRoleFlag = contextSrv.licensedAccessControlEnabled() && config.featureToggles.noBasicRole;
|
||||
const tooltipMessage = noBasicRoleFlag ? (
|
||||
const tooltipMessage = (
|
||||
<>
|
||||
You can now select the "No basic role" option and add permissions to your custom needs. You can find more
|
||||
information in
|
||||
@ -38,16 +36,12 @@ const tooltipMessage = noBasicRoleFlag ? (
|
||||
</TextLink>
|
||||
.
|
||||
</>
|
||||
) : (
|
||||
''
|
||||
);
|
||||
|
||||
const roles: Array<SelectableValue<OrgRole>> = Object.values(OrgRole)
|
||||
.filter((r) => noBasicRoleFlag || r !== OrgRole.None)
|
||||
.map((r) => ({
|
||||
label: r === OrgRole.None ? 'No basic role' : r,
|
||||
value: r,
|
||||
}));
|
||||
const roles: Array<SelectableValue<OrgRole>> = Object.values(OrgRole).map((r) => ({
|
||||
label: r === OrgRole.None ? 'No basic role' : r,
|
||||
value: r,
|
||||
}));
|
||||
|
||||
export interface FormModel {
|
||||
role: OrgRole;
|
||||
|
Loading…
Reference in New Issue
Block a user