plugin/team/Manager/TeamManager.php
public function initializeTeamRights(Team $team)
    {
        $workspace = $team->getWorkspace();
        $teamRole = $team->getRole();
        $teamManagerRole = $team->getTeamManagerRole();
        $resourceNode = !is_null($team->getDirectory()) ? $team->getDirectory()->getResourceNode() : null;

        if (!is_null($resourceNode)) {
            $workspaceRoles = $this->roleManager->getRolesByWorkspace($workspace);
            $rights = [];

            foreach ($workspaceRoles as $role) {
                if (!in_array($role->getUuid(), [$teamRole->getUuid(), $teamManagerRole->getUuid()])) {
                    $rights[$role->getName()] = [
                        'role' => $role,
                        'create' => [],
                        'open' => $team->isPublic(),
                    ];
                }
            }
            $this->applyRightsToResourceNode($resourceNode, $rights);
        }
    }
public function initializeTeamRights(Team $team)
    {
        $workspace = $team->getWorkspace();
        $teamRole = $team->getRole();
        $teamManagerRole = $team->getTeamManagerRole();
        $resourceNode = !is_null($team->getDirectory()) ? $team->getDirectory()->getResourceNode() : null;

        if (!is_null($resourceNode)) {
            $workspaceRoles = $this->roleManager->getRolesByWorkspace($workspace);
            $rights = [];

            foreach ($workspaceRoles as $role) {
                if (!in_array($role->getUuid(), [$teamRole->getUuid(), $teamManagerRole->getUuid()])) {
                    $rights[$role->getName()] = [
                        'role' => $role,
                        'create' => [],
                        'open' => $team->isPublic(),
                    ];
                }
            }
            $this->applyRightsToResourceNode($resourceNode, $rights);
        }
    }
public function initializeTeamRights ( Team $ team ) { $ workspace = $ team -> getWorkspace ( ) ; $ teamRole = $ team -> getRole ( ) ; $ teamManagerRole = $ team -> getTeamManagerRole ( ) ; $ resourceNode = ! is_null ( $ team -> getDirectory ( ) ) ? $ team -> getDirectory ( ) -> getResourceNode ( ) : null ; if ( ! is_null ( $ resourceNode ) ) { $ workspaceRoles = $ this -> roleManager -> getRolesByWorkspace ( $ workspace ) ; $ rights = [ ] ; foreach ( $ workspaceRoles as $ role ) { if ( ! in_array ( $ role -> getUuid ( ) , [ $ teamRole -> getUuid ( ) , $ teamManagerRole -> getUuid ( ) ] ) ) { $ rights [ $ role -> getName ( ) ] = [ 'role' => $ role , 'create' => [ ] , 'open' => $ team -> isPublic ( ) , ] ; } } $ this -> applyRightsToResourceNode ( $ resourceNode , $ rights ) ; } }
Sets rights to team directory for all workspace roles.

@param Team $team
Sets rights to team directory for all workspace roles .