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

Method userHasAnyAccess

src/FileRise/Support/ACL.php:169–182  ·  view source on GitHub ↗
(string $user, array $perms, string $folder = 'root')

Source from the content-addressed store, hash-verified

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);

Callers 2

filterVisibleSourcesMethod · 0.80

Calls 4

isAdminMethod · 0.95
canReadOwnMethod · 0.95
normalizeFolderMethod · 0.95

Tested by

no test coverage detected