Set the System ACL.

@param Sacl $sacl
@return $this
489694
public function setSacl(Sacl $sacl = null)
    {
        $this->sacl = $sacl;

        return $this->toggleAclPresent((bool) $sacl, Sacl::SDDL_CHAR);
    }
1316390
private function updateAceIdentityMap(AclInterface $acl)
    {
        foreach (array('classAces', 'classFieldAces', 'objectAces', 'objectFieldAces') as $property) {
            $reflection = new \ReflectionProperty($acl, $property);
            $reflection->setAccessible(true);
            $value = $reflection->getValue($acl);

            if ('classAces' === $property || 'objectAces' === $property) {
                $this->doUpdateAceIdentityMap($value);
            } else {
                foreach ($value as $field => $aces) {
                    $this->doUpdateAceIdentityMap($value[$field]);
                }
            }

            $reflection->setValue($acl, $value);
            $reflection->setAccessible(false);
        }
    }
1100966
public static function hydrate(stdClass $acl)
    {
        $hydrated = new AclEntity();

        if (isset($acl->id)) {
            $hydrated->setId($acl->id);
        }

        if (isset($acl->owner_user)) {
            $hydrated->setOwnerUser(UserHydrator::hydrate($acl->owner_user));
        }

        if (isset($acl->owner_team)) {
            $hydrated->setOwnerTeam(TeamHydrator::hydrate($acl->owner_team));
        }

        if (isset($acl->application)) {
            $hydrated->setApplication(ApplicationHydrator::hydrate($acl->application));
        }

        if (isset($acl->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($acl->created_by));
        }

        if (isset($acl->view)) {
            $hydrated->setView($acl->view);
        }

        if (isset($acl->delete)) {
            $hydrated->setDelete($acl->delete);
        }

        if (isset($acl->create)) {
            $hydrated->setCreate($acl->create);
        }

        if (isset($acl->edit)) {
            $hydrated->setEdit($acl->edit);
        }

        if (isset($acl->scan)) {
            $hydrated->setScan($acl->scan);
        }

        if (isset($acl->manage)) {
            $hydrated->setManage($acl->manage);
        }

        if (isset($acl->immutable)) {
            $hydrated->setImmutable($acl->immutable);
        }

        return $hydrated;
    }
1015484
public static function setObjectACL($key, $bucket, $acl = 'public-read')
    {
        $s3c = self::getS3C();
        if ($s3c->doesObjectExist($bucket, $key)) {
            $result = $s3c->putObjectAcl(array(
                'ACL' => $acl,
                'Bucket' => $bucket,
                'Key' => $key,
            ));
            if ($result) {
                return true;
            }
        }

        return false;
    }
317793
public function setEol($crlf)
    {
        $s = $crlf;
        if ($s === "cr" || $s === "mac") {
            $this->eolString = "\r";
        } elseif ($s === "lf" || $s === "unix") {
            $this->eolString = "\n";
        } elseif ($s === "crlf" || $s === "dos") {
            $this->eolString = "\r\n";
        } else {
            $this->eolString = $this->getProject()->getProperty('line.separator');
        }
    }
1176342
public function setCollation($collation)
    {
        if ($collation !== null) {
            $collation = $this->normalizeCollation($collation);
        }
        $this->collation = $collation;

        return $this;
    }
1176800
public function getAcl()
    {
        if ($this->_acl === null) {
            $serviceLocator = $this->getServiceLocator();
            // try service locator first
            if ($serviceLocator->has('Acl')) {
                $this->setAcl($serviceLocator->get('Acl'));
            // try default acl object
            } elseif (self::$_defaultAcl !== null) {
                return self::$_defaultAcl;

            }
        }

        return $this->_acl;
    }
38898
public function addChild(Acl $child)
    {
        $rules = $child->getRule();
        foreach ($rules as $rule) {
            $this->rules[] = $rule;
        }
        return $this;
    }
1365530
private function regenerateAncestorRelations(AclInterface $acl)
    {
        $pk = $acl->getId();
        $this->connection->executeQuery($this->getDeleteObjectIdentityRelationsSql($pk));
        $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $pk));

        $parentAcl = $acl->getParentAcl();
        while (null !== $parentAcl) {
            $this->connection->executeQuery($this->getInsertObjectIdentityRelationSql($pk, $parentAcl->getId()));

            $parentAcl = $parentAcl->getParentAcl();
        }
    }
512881
protected function applyAcl(\MUtil_Acl $acl, $userRole)
    {
        parent::applyAcl($acl, $userRole);

        if ($this->isVisible()) {
            $this->set('allowed', false);
            $this->set('visible', false);

            if ($this->_subItems) {
                foreach ($this->_subItems as $item) {

                    if ($item->get('visible', true)) {
                        $this->set('allowed', true);
                        $this->set('visible', true);

                        return $this;
                    }
                }
            }
        }
        return $this;
    }
841365
public function setEol(string $eol) {
        if (strpos($eol, "\n") === false) {
            throw new \InvalidArgumentException('The EOL must include the "\n" character."', 500);
        }

        $this->eol = $eol;
        return $this;
    }
981025
public function setApacheAcl($path, $permissions, $recursive = false)
    {
        return $this->send('set_apache_acl', $path, $permissions, $recursive);
    }
1148911
public static function createRole($name, AVACL $acl)
    {
        $role = AVObject::create(static::$avClassName);
        $role->setName($name);
        $role->setACL($acl);

        return $role;
    }
264145
public function setName($acl)
    {
        $acl = strtolower($acl);
        if (in_array($acl, $this->possibleOptions)) {
            $this->name = $acl;
        } else {
            throw new InvalidAclException;
        }
    }
1297994
private function loadAcl()
    {
        $this->acl = new Acl();

        foreach ($this->serviceLocator->get('BjyAuthorize\RoleProviders') as $provider) {
            $this->addRoleProvider($provider);
        }

        foreach ($this->serviceLocator->get('BjyAuthorize\ResourceProviders') as $provider) {
            $this->addResourceProvider($provider);
        }

        foreach ($this->serviceLocator->get('BjyAuthorize\RuleProviders') as $provider) {
            $this->addRuleProvider($provider);
        }

        foreach ($this->serviceLocator->get('BjyAuthorize\Guards') as $guard) {
            $this->addGuard($guard);
        }

        foreach ($this->roleProviders as $provider) {
            $this->addRoles($provider->getRoles());
        }

        foreach ($this->resourceProviders as $provider) {
            $this->loadResource($provider->getResources(), null);
        }

        foreach ($this->ruleProviders as $provider) {
            $rules = $provider->getRules();
            if (isset($rules['allow'])) {
                foreach ($rules['allow'] as $rule) {
                    $this->loadRule($rule, static::TYPE_ALLOW);
                }
            }

            if (isset($rules['deny'])) {
                foreach ($rules['deny'] as $rule) {
                    $this->loadRule($rule, static::TYPE_DENY);
                }
            }
        }
    }
1219029
public CreateDirectoryContext setDefaultAcl(List<AclEntry> defaultAcl) {
    mDefaultAcl = ImmutableList.copyOf(defaultAcl);
    return getThis();
  }
284036
public function set_acl($folder, $user, $acl)
    {
        if (!$this->get_capability('ACL')) {
            return false;
        }

        if (!$this->check_connection()) {
            return false;
        }

        $this->clear_cache('mailboxes.folder-info.' . $folder);

        return $this->conn->setACL($folder, $user, $acl);
    }