file store adds memdb implementation

This commit is contained in:
Chris Lu
2018-05-12 13:45:29 -07:00
parent a808df5019
commit 81af1bafba
7 changed files with 368 additions and 106 deletions

22
weed/filer2/permission.go Normal file
View File

@@ -0,0 +1,22 @@
package filer2
func hasWritePermission(dir *Entry, entry *Entry) bool {
if dir == nil {
return false
}
if dir.Uid == entry.Uid && dir.Mode&0200 > 0 {
return true
}
if dir.Gid == entry.Gid && dir.Mode&0020 > 0 {
return true
}
if dir.Mode&0002 > 0 {
return true
}
return false
}