MCPcopy Create free account
hub / github.com/error311/FileRise / canWrite

Method canWrite

src/FileRise/Support/ACL.php:1062–1070  ·  view source on GitHub ↗
(string $user, array $perms, string $folder)

Source from the content-addressed store, hash-verified

1060 }
1061
1062 public static function canWrite(string $user, array $perms, string $folder): bool
1063 {
1064 $folder = self::normalizeFolder($folder);
1065 if (self::isAdmin($perms)) {
1066 return true;
1067 }
1068 return self::hasGrant($user, $folder, 'owners')
1069 || self::hasGrant($user, $folder, 'write');
1070 }
1071
1072 public static function canShare(string $user, array $perms, string $folder): bool
1073 {

Callers 7

enforceFolderScopeMethod · 0.80
enforceFolderScopeMethod · 0.80
saveFileTagMethod · 0.80
createFileMethod · 0.80
opSaveFileTagMethod · 0.80
assertFolderScopeMethod · 0.80

Calls 3

normalizeFolderMethod · 0.95
isAdminMethod · 0.95
hasGrantMethod · 0.95

Tested by

no test coverage detected