From 7f5da8971b363da9bf6bf50bd3dc9dfcf9dee56e Mon Sep 17 00:00:00 2001 From: Filippov Alex Date: Fri, 26 Jan 2024 13:32:00 +0530 Subject: [PATCH] technical debt --- endpoint/common.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/endpoint/common.go b/endpoint/common.go index 233d561d9..461868b9f 100644 --- a/endpoint/common.go +++ b/endpoint/common.go @@ -22,7 +22,6 @@ import ( "context" "github.com/e154/smart-home/adaptors" - "github.com/e154/smart-home/common" m "github.com/e154/smart-home/models" "github.com/e154/smart-home/system/access_list" "github.com/e154/smart-home/system/automation" @@ -86,9 +85,5 @@ func (c *CommonEndpoint) checkSuperUser(ctx context.Context) (decline bool) { root, _ := ctx.Value("root").(bool) //log.Debugf("root: %t, %t", root, ok) - if root { - return - } - - return c.appConfig.Mode == common.DemoMode + return !root }