concrete/src/Area/Area.php
public function revertToPagePermissions()
    {
        // this function removes all permissions records for a particular area on this page
        // and sets it to inherit from the page above
        // this function will also need to ensure that pages below it do the same

        $db = Database::connection();
        $v = array($this->getAreaHandle(), $this->getCollectionID());
        $db->executeQuery('delete from AreaPermissionAssignments where arHandle = ? and cID = ?', $v);
        $db->executeQuery('update Areas set arOverrideCollectionPermissions = 0 where arID = ?', array($this->getAreaID()));

        // now we set rescan this area to determine where it -should- be inheriting from
        $this->arOverrideCollectionPermissions = false;
        $this->rescanAreaPermissionsChain();

        $areac = $this->getAreaCollectionObject();
        if ($areac->isMasterCollection()) {
            $this->rescanSubAreaPermissionsMasterCollection($areac);
        } else {
            if ($areac->overrideTemplatePermissions()) {
                // now we scan sub areas
                $this->rescanSubAreaPermissions();
            }
        }
    }
public function revertToPagePermissions()
    {
        // this function removes all permissions records for a particular area on this page
        // and sets it to inherit from the page above
        // this function will also need to ensure that pages below it do the same

        $db = Database::connection();
        $v = array($this->getAreaHandle(), $this->getCollectionID());
        $db->executeQuery('delete from AreaPermissionAssignments where arHandle = ? and cID = ?', $v);
        $db->executeQuery('update Areas set arOverrideCollectionPermissions = 0 where arID = ?', array($this->getAreaID()));

        // now we set rescan this area to determine where it -should- be inheriting from
        $this->arOverrideCollectionPermissions = false;
        $this->rescanAreaPermissionsChain();

        $areac = $this->getAreaCollectionObject();
        if ($areac->isMasterCollection()) {
            $this->rescanSubAreaPermissionsMasterCollection($areac);
        } else {
            if ($areac->overrideTemplatePermissions()) {
                // now we scan sub areas
                $this->rescanSubAreaPermissions();
            }
        }
    }
public function revertToPagePermissions ( ) { // this function removes all permissions records for a particular area on this page // and sets it to inherit from the page above // this function will also need to ensure that pages below it do the same $ db = Database :: connection ( ) ; $ v = array ( $ this -> getAreaHandle ( ) , $ this -> getCollectionID ( ) ) ; $ db -> executeQuery ( 'delete from AreaPermissionAssignments where arHandle = ? and cID = ?' , $ v ) ; $ db -> executeQuery ( 'update Areas set arOverrideCollectionPermissions = 0 where arID = ?' , array ( $ this -> getAreaID ( ) ) ) ; // now we set rescan this area to determine where it -should- be inheriting from $ this -> arOverrideCollectionPermissions = false ; $ this -> rescanAreaPermissionsChain ( ) ; $ areac = $ this -> getAreaCollectionObject ( ) ; if ( $ areac -> isMasterCollection ( ) ) { $ this -> rescanSubAreaPermissionsMasterCollection ( $ areac ) ; } else { if ( $ areac -> overrideTemplatePermissions ( ) ) { // now we scan sub areas $ this -> rescanSubAreaPermissions ( ) ; } } }
This function removes all permissions records for the current Area
and sets it to inherit from the Page permissions.
This function removes all permissions records for the current Area and sets it to inherit from the Page permissions .