Permission/AbstractPermissionManager.php
private function buildMasterFieldPermissions(SubjectIdentityInterface $subject, array $permissions)
    {
        if ($this->hasConfig($subject->getType())) {
            $map = $this->getConfig($subject->getType())->getMasterFieldMappingPermissions();

            foreach ($permissions as &$permission) {
                if (false !== $key = array_search($permission, $map, true)) {
                    $permission = $key;
                }
            }
        }

        return $permissions;
    }
private function buildMasterFieldPermissions(SubjectIdentityInterface $subject, array $permissions)
    {
        if ($this->hasConfig($subject->getType())) {
            $map = $this->getConfig($subject->getType())->getMasterFieldMappingPermissions();

            foreach ($permissions as &$permission) {
                if (false !== $key = array_search($permission, $map, true)) {
                    $permission = $key;
                }
            }
        }

        return $permissions;
    }
private function buildMasterFieldPermissions ( SubjectIdentityInterface $ subject , array $ permissions ) { if ( $ this -> hasConfig ( $ subject -> getType ( ) ) ) { $ map = $ this -> getConfig ( $ subject -> getType ( ) ) -> getMasterFieldMappingPermissions ( ) ; foreach ( $ permissions as & $ permission ) { if ( false !== $ key = array_search ( $ permission , $ map , true ) ) { $ permission = $ key ; } } } return $ permissions ; }
Build the master permissions.

@param SubjectIdentityInterface $subject     The subject identity
@param string[]                 $permissions The permissions

@return string[]
Build the master permissions .