User: Clean up update functions (#86341)

* User: remove unused function

* User: Remove UpdatePermissions and support IsGrafanaAdmin flag in Update function instead

* User: Remove Disable function and use Update instead
This commit is contained in:
Karl Persson
2024-04-16 16:33:50 +02:00
committed by GitHub
parent 8c8885ef23
commit 0f06120b56
14 changed files with 91 additions and 267 deletions
@@ -509,7 +509,7 @@ func TestUserSync_EnableDisabledUserHook(t *testing.T) {
t.Run(tt.desc, func(t *testing.T) {
userSvc := usertest.NewUserServiceFake()
called := false
userSvc.DisableFn = func(ctx context.Context, cmd *user.DisableUserCommand) error {
userSvc.UpdateFn = func(ctx context.Context, cmd *user.UpdateUserCommand) error {
called = true
return nil
}