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

Method canCreate

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

Source from the content-addressed store, hash-verified

1389 // --- Granular write family -----------------------------------------------
1390
1391 public static function canCreate(string $user, array $perms, string $folder): bool
1392 {
1393 $folder = self::normalizeFolder($folder);
1394 if (self::isAdmin($perms)) {
1395 return true;
1396 }
1397 return self::hasGrant($user, $folder, 'owners')
1398 || self::hasGrant($user, $folder, 'create')
1399 || self::hasGrant($user, $folder, 'write');
1400 }
1401
1402 public static function canCreateFolder(string $user, array $perms, string $folder): bool
1403 {

Callers 10

capabilitiesMethod · 0.80
enforceFolderScopeMethod · 0.80
moveFolderMethod · 0.80
enforceFolderScopeMethod · 0.80
copyFilesMethod · 0.80
createFileMethod · 0.80
opCreateFileMethod · 0.80
opMoveFolderMethod · 0.80
assertFolderScopeMethod · 0.80

Calls 3

normalizeFolderMethod · 0.95
isAdminMethod · 0.95
hasGrantMethod · 0.95

Tested by

no test coverage detected