Legacy-only explicit (to avoid breaking existing callers)
(string $folder)
| 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 |
no test coverage detected