Skip to content

Commit

Permalink
technical debt
Browse files Browse the repository at this point in the history
  • Loading branch information
e154 committed Jan 26, 2024
1 parent bd2bff3 commit 7f5da89
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions endpoint/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

0 comments on commit 7f5da89

Please sign in to comment.