浏览代码

Fixed minor bug in user share folder root

Toby Chui 3 年之前
父节点
当前提交
12f129213c
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      mod/share/shareEntry/shareOptions.go

+ 3 - 0
mod/share/shareEntry/shareOptions.go

@@ -18,6 +18,9 @@ func (s *ShareOption) IsAccessibleBy(username string, usergroup []string) bool {
 		if stringInSlice(username, s.Accessibles) {
 			//User's name is in the allowed group
 			return true
+		} else if s.Owner == username {
+			//This user own this file
+			return true
 		}
 	}
 	return false