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

Method explicit

src/FileRise/Support/ACL.php:1083–1102  ·  view source on GitHub ↗

Legacy-only explicit (to avoid breaking existing callers)

(string $folder)

Source from the content-addressed store, hash-verified

1081
1082 // Legacy-only explicit (to avoid breaking existing callers)
1083 public static function explicit(string $folder): array
1084 {
1085 $folder = self::normalizeFolder($folder);
1086 $acl = self::$cache ?? self::loadFresh();
1087 $rec = $acl['folders'][$folder] ?? [];
1088 $norm = function ($v): array {
1089 if (!is_array($v)) {
1090 return [];
1091 }
1092 $v = array_map('strval', $v);
1093 return array_values(array_unique($v));
1094 };
1095 return [
1096 'owners' => $norm($rec['owners'] ?? []),
1097 'read' => $norm($rec['read'] ?? []),
1098 'write' => $norm($rec['write'] ?? []),
1099 'share' => $norm($rec['share'] ?? []),
1100 'read_own' => $norm($rec['read_own'] ?? []),
1101 ];
1102 }
1103
1104 // New: full explicit including granular
1105 public static function explicitAll(string $folder): array

Callers 1

createFolderMethod · 0.80

Calls 2

normalizeFolderMethod · 0.95
loadFreshMethod · 0.95

Tested by

no test coverage detected