(meta *model.Meta, path string)
| 41 | } |
| 42 | |
| 43 | func 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 | |
| 50 | func 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 |