List Acls

 @return [Array<Kong::Acl>]
15398
def acls
      acls = []
      response = client.get("#{@api_end_point}#{self.id}/acls") rescue nil
      if response
        response['data'].each do |attributes|
          acls << Kong::Acl.new(attributes)
        end
      end
      acls
    end
429350
public synchronized List<ACL> convertLong(Long longVal) {
        if (longVal == null)
            return null;
        if (longVal == -1L)
            return Ids.OPEN_ACL_UNSAFE;
        List<ACL> acls = longKeyMap.get(longVal);
        if (acls == null) {
            LOG.error("ERROR: ACL not available for long " + longVal);
            throw new RuntimeException("Failed to fetch acls for " + longVal);
        }
        return acls;
    }
862286
public java.util.List<NetworkAcl> getNetworkAcls() {
        if (networkAcls == null) {
            networkAcls = new com.amazonaws.internal.SdkInternalList<NetworkAcl>();
        }
        return networkAcls;
    }
440162
def list(limit = nil, cursor = nil)
      qs = {}
      qs[:limit] = limit if limit
      qs[:cursor] = cursor if cursor

      api.get('', qs)
    end
737844
def to_dict(cls, acl):
        
        return {
            "perms": acl.perms,
            "id": {
                "scheme": acl.id.scheme,
                "id": acl.id.id
            }
        }
453594
def acl(self):
        """"""
        r = fapi.get_workspace_acl(self.namespace, self.name, self.api_url)
        fapi._check_response_code(r, 200)
        return r.json()
241717
private function getAcl(): ?array {

		if (!$this->issetCache('acl')) {
		
			$query =
				'SELECT r.*, m.name AS module_name' .
				' FROM `rules` AS r' .
				' INNER JOIN `acl` AS a ON a.rule_id = r.id'.
				' INNER JOIN `modules` AS m ON r.module_id = m.id'.
				' WHERE a.group_id = ?';
			
			$this->db->setQuery($query);
			$this->setCache('acl', $this->db->loadObjectList($this->groupId));

		}

		return $this->getCache('acl');
		
	}
1302633
private function analyze_user_acl($acl) {
		$result = array ();
		if (is_array ( $acl )) {
			//(1).a
			$result ['content'] = $this->check_user_acl ( $acl );
		} else if (is_string ( $acl )) {
			if (in_array ( $acl, self::$ACL_TYPES )) {
				//(2).a
				$result ["headers"] = array (
						"x-bs-acl" => $acl );
			} else {
				//(1).b
				$result ['content'] = $acl;
			}
		} else {
			throw new BCS_Exception ( "Invalid acl.", - 1 );
		}
		return $result;
	}
1303056
private function list_rights($attrib=array())
    {
        // Get ACL for the folder
        $acl = $this->rc->storage->get_acl($this->mbox);

        if (!is_array($acl)) {
            $acl = array();
        }

        // Keep special entries (anyone/anonymous) on top of the list
        if (!empty($this->specials) && !empty($acl)) {
            foreach ($this->specials as $key) {
                if (isset($acl[$key])) {
                    $acl_special[$key] = $acl[$key];
                    unset($acl[$key]);
                }
            }
        }

        // Sort the list by username
        uksort($acl, 'strnatcasecmp');

        if (!empty($acl_special)) {
            $acl = array_merge($acl_special, $acl);
        }

        // Get supported rights and build column names
        $supported = $this->rights_supported();

        // give plugins the opportunity to adjust this list
        $data = $this->rc->plugins->exec_hook('acl_rights_supported',
            array('rights' => $supported, 'folder' => $this->mbox, 'labels' => array()));
        $supported = $data['rights'];

        // depending on server capability either use 'te' or 'd' for deleting msgs
        $deleteright = implode(array_intersect(str_split('ted'), $supported));

        // Use advanced or simple (grouped) rights
        $advanced = $this->rc->config->get('acl_advanced_mode');

        if ($advanced) {
            $items = array();
            foreach ($supported as $sup) {
                $items[$sup] = $sup;
            }
        }
        else {
            $items = array(
                'read' => 'lrs',
                'write' => 'wi',
                'delete' => $deleteright,
                'other' => preg_replace('/[lrswi'.$deleteright.']/', '', implode($supported)),
            );

            // give plugins the opportunity to adjust this list
            $data = $this->rc->plugins->exec_hook('acl_rights_simple',
                array('rights' => $items, 'folder' => $this->mbox, 'labels' => array()));
            $items = $data['rights'];
        }

        // Create the table
        $attrib['noheader'] = true;
        $table = new html_table($attrib);

        // Create table header
        $table->add_header('user', $this->gettext('identifier'));
        foreach (array_keys($items) as $key) {
            $label = $data['labels'][$key] ?: $this->gettext('shortacl'.$key);
            $table->add_header(array('class' => 'acl'.$key, 'title' => $label), $label);
        }

        $js_table = array();
        foreach ($acl as $user => $rights) {
            if ($this->rc->storage->conn->user == $user) {
                continue;
            }

            // filter out virtual rights (c or d) the server may return
            $userrights = array_intersect($rights, $supported);
            $userid = rcube_utils::html_identifier($user);

            if (!empty($this->specials) && in_array($user, $this->specials)) {
                $user = $this->gettext($user);
            }

            $table->add_row(array('id' => 'rcmrow'.$userid));
            $table->add('user', html::a(array('id' => 'rcmlinkrow'.$userid), rcube::Q($user)));

            foreach ($items as $key => $right) {
                $in = $this->acl_compare($userrights, $right);
                switch ($in) {
                    case 2: $class = 'enabled'; break;
                    case 1: $class = 'partial'; break;
                    default: $class = 'disabled'; break;
                }
                $table->add('acl' . $key . ' ' . $class, '');
            }

            $js_table[$userid] = implode($userrights);
        }

        $this->rc->output->set_env('acl', $js_table);
        $this->rc->output->set_env('acl_advanced', $advanced);

        $out = $table->show();

        return $out;
    }
779775
def _get_dynamic_acl_info(self, switch_ip):
        """"""
        cmds = ["enable",
                "show ip access-lists dynamic",
                "show ip access-lists summary dynamic"]
        switch = self._switches.get(switch_ip)

        _, acls, bindings = self._run_eos_cmds(cmds, switch)

        parsed_acls = self._parse_acl_config(acls)
        parsed_bindings = self._parse_binding_config(bindings)

        return parsed_acls, parsed_bindings
627329
private function action_list()
    {
        if (in_array('acl_advanced_mode', (array)$this->rc->config->get('dont_override'))) {
            return;
        }

        $this->mbox = trim(rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GPC, true)); // UTF7-IMAP
        $advanced   = trim(rcube_utils::get_input_value('_mode', rcube_utils::INPUT_GPC));
        $advanced   = $advanced == 'advanced';

        // Save state in user preferences
        $this->rc->user->save_prefs(array('acl_advanced_mode' => $advanced));

        $out = $this->list_rights();

        $out = preg_replace(array('/^<table[^>]+>/', '/<\/table>$/'), '', $out);

        $this->rc->output->command('acl_list_update', $out);
    }
1023940
def as_list(self):
        ""
        netloc = ''
        if self.vpath_connector:
            netloc = '(('+self.vpath_connector+'))'
        elif self.authority:
            netloc = self.authority
        else:
            netloc = self.netloc
        return [
            self.scheme,
            netloc,
            self.path,
            self.query,
            '',
            ]
405803
public alluxio.grpc.PAcl getAcl() {
    return acl_ == null ? alluxio.grpc.PAcl.getDefaultInstance() : acl_;
  }
1141765
private function getKeysFromAcl() {
        $keys = [];
        foreach ($this->accessList as $access) {
            $keys[$access['publicKey']] = $access['privateKey'];
        }

        return $keys;
    }
839481
public List<Acl> listAcls() {
    // [START listAcls]
    List<Acl> acls = bucket.listAcls();
    for (Acl acl : acls) {
      // do something with ACL entry
    }
    // [END listAcls]
    return acls;
  }
1334176
public synchronized Long convertAcls(List<ACL> acls) {
        if (acls == null)
            return -1L;
        // get the value from the map
        Long ret = aclKeyMap.get(acls);
        // could not find the map
        if (ret != null)
            return ret;
        long val = incrementIndex();
        longKeyMap.put(val, acls);
        aclKeyMap.put(acls, val);
        return val;
    }
354542
def getACLs(self, base, searchstr):
		
		acls = dict()
		res = self.query(base, searchstr, ['cn', 'ipHostNumber'])
		for dn,attr in res:
			cn = attr['cn'][0]
			dests = dict()
			if attr.has_key('ipHostNumber'):
				for entry in attr['ipHostNumber']:
					dest = entry.split('#', 1)[0].replace(" ", "")
					if len(entry.split('#', 1)) == 2:
						desc = entry.split('#', 1)[1].strip()
					else:
						desc = ""
					if not is_ip(dest):
						print dest, desc
						raise InputError(dest, "Invalid IP format")
					dests[dest] = desc
			acls[cn] = dests
		return acls