AuthN: Change the external service account state on plugin state change (#77157)

* Disable plugin service account

* Revert extsvc injection

* handle plugin state changes

* Use isProxyEnabled

* Remove plugininteg changes

* Change update function to also work for mysql 😩

* Change test to also check no collateral update

* Update pkg/services/serviceaccounts/database/store_test.go

* Update pkg/services/serviceaccounts/database/store_test.go
This commit is contained in:
Gabriel MABILLE
2023-10-27 13:46:25 +02:00
committed by GitHub
parent 57335cb173
commit 2727f41474
12 changed files with 441 additions and 62 deletions

View File

@@ -196,6 +196,12 @@ type ManageExtSvcAccountCmd struct {
Permissions []accesscontrol.Permission
}
type EnableExtSvcAccountCmd struct {
ExtSvcSlug string
Enabled bool
OrgID int64
}
// AccessEvaluator is used to protect the "Configuration > Service accounts" page access
var AccessEvaluator = accesscontrol.EvalAny(
accesscontrol.EvalPermission(ActionRead),