(string $user, array $perms, string $folder = 'root')
| 167 | } |
| 168 | |
| 169 | public static function userHasAnyAccess(string $user, array $perms, string $folder = 'root'): bool |
| 170 | { |
| 171 | if (self::isAdmin($perms)) { |
| 172 | return true; |
| 173 | } |
| 174 | if (self::canReadOwn($user, $perms, $folder)) { |
| 175 | return true; |
| 176 | } |
| 177 | if (self::normalizeFolder($folder) !== 'root') { |
| 178 | return false; |
| 179 | } |
| 180 | // Fall back to any explicit grants within this source when root isn't readable. |
| 181 | return self::userHasAnyExplicitAccess($user); |
| 182 | } |
| 183 | public static function ownsFolderOrAncestor(string $user, array $perms, string $folder): bool |
| 184 | { |
| 185 | $folder = self::normalizeFolder($folder); |
no test coverage detected