framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php
public function getComputedMask($resourceType, $folderPath)
    {
        $_computedMask = 0;

        $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
        $_roleSessionVar = $_config->getRoleSessionVar();

        $_userRole = null;
        if (strlen($_roleSessionVar) && isset($_SESSION[$_roleSessionVar])) {
            $_userRole = (string)$_SESSION[$_roleSessionVar];
        }
        if (!is_null($_userRole) && !strlen($_userRole)) {
            $_userRole = null;
        }

        $folderPath = trim($folderPath, "/");
        $_pathParts = explode("/", $folderPath);

        $_currentPath = "/";

        for($i = -1; $i < sizeof($_pathParts); $i++) {
            if ($i >= 0) {
                if (!strlen($_pathParts[$i])) {
                    continue;
                }

                if (array_key_exists($_currentPath . '*/', $this->_aclEntries))
                $_computedMask = $this->mergePathComputedMask( $_computedMask, $resourceType, $_userRole, $_currentPath . '*/' );

                $_currentPath .= $_pathParts[$i] . '/';
            }

            if (array_key_exists($_currentPath, $this->_aclEntries)) {
                $_computedMask = $this->mergePathComputedMask( $_computedMask, $resourceType, $_userRole, $_currentPath );
            }
        }

        return $_computedMask;
    }
public function getComputedMask($resourceType, $folderPath)
    {
        $_computedMask = 0;

        $_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");
        $_roleSessionVar = $_config->getRoleSessionVar();

        $_userRole = null;
        if (strlen($_roleSessionVar) && isset($_SESSION[$_roleSessionVar])) {
            $_userRole = (string)$_SESSION[$_roleSessionVar];
        }
        if (!is_null($_userRole) && !strlen($_userRole)) {
            $_userRole = null;
        }

        $folderPath = trim($folderPath, "/");
        $_pathParts = explode("/", $folderPath);

        $_currentPath = "/";

        for($i = -1; $i < sizeof($_pathParts); $i++) {
            if ($i >= 0) {
                if (!strlen($_pathParts[$i])) {
                    continue;
                }

                if (array_key_exists($_currentPath . '*/', $this->_aclEntries))
                $_computedMask = $this->mergePathComputedMask( $_computedMask, $resourceType, $_userRole, $_currentPath . '*/' );

                $_currentPath .= $_pathParts[$i] . '/';
            }

            if (array_key_exists($_currentPath, $this->_aclEntries)) {
                $_computedMask = $this->mergePathComputedMask( $_computedMask, $resourceType, $_userRole, $_currentPath );
            }
        }

        return $_computedMask;
    }
public function getComputedMask ( $ resourceType , $ folderPath ) { $ _computedMask = 0 ; $ _config = & CKFinder_Connector_Core_Factory :: getInstance ( "Core_Config" ) ; $ _roleSessionVar = $ _config -> getRoleSessionVar ( ) ; $ _userRole = null ; if ( strlen ( $ _roleSessionVar ) && isset ( $ _SESSION [ $ _roleSessionVar ] ) ) { $ _userRole = ( string ) $ _SESSION [ $ _roleSessionVar ] ; } if ( ! is_null ( $ _userRole ) && ! strlen ( $ _userRole ) ) { $ _userRole = null ; } $ folderPath = trim ( $ folderPath , "/" ) ; $ _pathParts = explode ( "/" , $ folderPath ) ; $ _currentPath = "/" ; for ( $ i = - 1 ; $ i < sizeof ( $ _pathParts ) ; $ i ++ ) { if ( $ i >= 0 ) { if ( ! strlen ( $ _pathParts [ $ i ] ) ) { continue ; } if ( array_key_exists ( $ _currentPath . '*/' , $ this -> _aclEntries ) ) $ _computedMask = $ this -> mergePathComputedMask ( $ _computedMask , $ resourceType , $ _userRole , $ _currentPath . '*/' ) ; $ _currentPath .= $ _pathParts [ $ i ] . '/' ; } if ( array_key_exists ( $ _currentPath , $ this -> _aclEntries ) ) { $ _computedMask = $ this -> mergePathComputedMask ( $ _computedMask , $ resourceType , $ _userRole , $ _currentPath ) ; } } return $ _computedMask ; }
Get computed mask

@param string $resourceType
@param string $folderPath
@return int
Get computed mask