summaryrefslogtreecommitdiff
path: root/internal/user/server
diff options
context:
space:
mode:
authorPaul Buetow <git@mx.buetow.org>2020-12-26 11:44:31 +0000
committerPaul Buetow <git@mx.buetow.org>2020-12-26 11:44:31 +0000
commit60fa324cd5296b088c24d8db1d334a25ca955788 (patch)
tree88c14b39b66f5273cebf96307c86293b178cce40 /internal/user/server
parentab676c2b484225ed22765b23d8f0545088ecd610 (diff)
initial spartan mode support
Diffstat (limited to 'internal/user/server')
-rw-r--r--internal/user/server/user.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/user/server/user.go b/internal/user/server/user.go
index c4e8b7b..637945c 100644
--- a/internal/user/server/user.go
+++ b/internal/user/server/user.go
@@ -40,6 +40,10 @@ func (u *User) String() string {
// HasFilePermission is used to determine whether user is alowed to read a file.
func (u *User) HasFilePermission(filePath, permissionType string) (hasPermission bool) {
logger.Debug(u, filePath, permissionType, "Checking config permissions")
+ if config.ServerRelaxedAuthEnable {
+ logger.Fatal(u, filePath, permissionType, "Server releaxed auth enabled")
+ return true
+ }
if u.Name == config.ScheduleUser || u.Name == config.ContinuousUser {
// Background user has same permissions as dtail process itself.