Auth: Fix orgrole picker disabled if isSynced user (#64033)

* fix: disable orgrolepicker if externaluser is synced

* add disable to role picker

* just took me 2 hours to center the icon

* wip

* fix: check externallySyncedUser for API call

* remove check from store

* add: tests

* refactor authproxy and made tests run

* add: feature toggle

* set feature toggle for tests

* add: IsProviderEnabled

* refactor: featuretoggle name

* IsProviderEnabled tests

* add specific tests for isProviderEnabled

* fix: org_user tests

* add: owner to featuretoggle

* add missing authlabels

* remove fmt

* feature toggle

* change config

* add test for a different authmodule

* test refactor

* gen feature toggle again

* fix basic auth user able to change the org role

* test for basic auth role

* make err.base to error

* lowered lvl of log and input mesg
This commit is contained in:
Eric Leijonmarck
2023-03-22 17:41:59 +00:00
committed by GitHub
parent 13af5afaf3
commit 3cd952b8ba
38 changed files with 405 additions and 161 deletions
+6
View File
@@ -393,6 +393,12 @@ var (
State: FeatureStateAlpha,
Owner: grafanaBackendPlatformSquad,
},
{
Name: "onlyExternalOrgRoleSync",
Description: "Prohibits a user from changing organization roles synced with external auth providers",
State: FeatureStateAlpha,
Owner: grafanaAuthnzSquad,
},
{
Name: "drawerDataSourcePicker",
Description: "Changes the user experience for data source selection to a drawer.",
+1
View File
@@ -58,6 +58,7 @@ logsContextDatasourceUi,alpha,@grafana/observability-logs,false,false,false,true
lokiQuerySplitting,alpha,@grafana/observability-logs,false,false,false,true
lokiQuerySplittingConfig,alpha,@grafana/observability-logs,false,false,false,true
individualCookiePreferences,alpha,@grafana/backend-platform,false,false,false,false
onlyExternalOrgRoleSync,alpha,@grafana/grafana-authnz-team,false,false,false,false
drawerDataSourcePicker,alpha,@grafana/grafana-bi-squad,false,false,false,true
traceqlSearch,alpha,@grafana/observability-traces-and-profiling,false,false,false,true
prometheusMetricEncyclopedia,alpha,@grafana/observability-metrics,false,false,false,true
1 Name State Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
58 lokiQuerySplitting alpha @grafana/observability-logs false false false true
59 lokiQuerySplittingConfig alpha @grafana/observability-logs false false false true
60 individualCookiePreferences alpha @grafana/backend-platform false false false false
61 onlyExternalOrgRoleSync alpha @grafana/grafana-authnz-team false false false false
62 drawerDataSourcePicker alpha @grafana/grafana-bi-squad false false false true
63 traceqlSearch alpha @grafana/observability-traces-and-profiling false false false true
64 prometheusMetricEncyclopedia alpha @grafana/observability-metrics false false false true
+4
View File
@@ -243,6 +243,10 @@ const (
// Support overriding cookie preferences per user
FlagIndividualCookiePreferences = "individualCookiePreferences"
// FlagOnlyExternalOrgRoleSync
// Prohibits a user from changing organization roles synced with external auth providers
FlagOnlyExternalOrgRoleSync = "onlyExternalOrgRoleSync"
// FlagDrawerDataSourcePicker
// Changes the user experience for data source selection to a drawer.
FlagDrawerDataSourcePicker = "drawerDataSourcePicker"