MCPcopy Create free account
hub / github.com/OpenListTeam/OpenList / CanWriteContentBypassUserPerms

Function CanWriteContentBypassUserPerms

server/common/check.go:43–48  ·  view source on GitHub ↗
(meta *model.Meta, path string)

Source from the content-addressed store, hash-verified

41}
42
43func CanWriteContentBypassUserPerms(meta *model.Meta, path string) bool {
44 if meta == nil || !meta.Write {
45 return false
46 }
47 return MetaCoversPath(meta.Path, path, meta.WSub)
48}
49
50func CanAccess(user *model.User, meta *model.Meta, reqPath string, password string) bool {
51 // if the reqPath is in hide (only can check the nearest meta) and user can't see hides, can't access

Callers 10

FsUpFunction · 0.92
handlePutMethod · 0.92
handleMkcolMethod · 0.92
callFSListMethod · 0.92
FsMkdirFunction · 0.92
FsListFunction · 0.92
uploadAuthFunction · 0.92
MkdirFunction · 0.92

Calls 1

MetaCoversPathFunction · 0.85