Shows collections with ACL.
234
def access_storage_list(**kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('access:storage:list', **{
        'storage': ctx.repo.create_secure_service('storage'),
    })
945360
function collections(options) {
  options = options || {};

  return function plugin(app, base) {
    if (!isValidInstance(app)) return;

    app.option(base.options);
    app.option(options);

    app.create('badges', { viewType: 'partial' });
    app.create('docs', { viewType: 'partial' });

    app.use(require('generate-collections'));
    return plugin;
  };
}
1115058
public List<Acl> listBucketAcls(String bucketName) {
    // [START listBucketAcls]
    List<Acl> acls = storage.listAcls(bucketName);
    for (Acl acl : acls) {
      // do something with ACL entry
    }
    // [END listBucketAcls]
    return acls;
  }
363099
public function collections()
    {
        if (!$this->collections) {
            $this->collections = [];

            /** @var \record_adapter $record */
            foreach ($this as $record) {
                if (! isset($this->collections[$record->getBaseId()])) {
                    $this->collections[$record->getBaseId()] = $record->get_collection();
                }
            }

            $this->collections = array_values($this->collections);
        }

        return $this->collections;
    }
447427
def get_collections(self):
        
        collections = []
        for result in self._get_collections():
            collections.append(result['collection'])

        return collections
170848
def select(self, names):
        """"""
        return PolicyCollection(
            [p for p in self.policies if p.name in names], self.options)
948193
def _prep_acl_for_compare(ACL):
    '''
    
    '''
    ret = copy.deepcopy(ACL)
    ret['Owner'] = _normalize_user(ret['Owner'])
    for item in ret.get('Grants', ()):
        item['Grantee'] = _normalize_user(item.get('Grantee'))
    return ret
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;
  }
998506
def resource_collection_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/resource_collections/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
873247
def collections(self):
        """"""
        # if cache server is configured, load collection from there
        if self.cache:
            return self.cache.get(
                self.app.config['COLLECTIONS_CACHE_KEY'])
941074
private final function loadAcl(): void
    {
        $this->acl = new Acl($this);

        $rules = $this->config->get('acl.rules');
        if ($rules != null) {
            $this->acl->setRules($rules);
        }
    }
658645
def in_collection(user=nil,start=nil,count=nil,sort=nil,query=nil)
      api.getArtistsInCollection user,start,count,sort,query
    end
1243897
public function overviewAction()
    {
        $roles = array();

        foreach ($this->acl->getRolePrivileges() as $role => $privileges) {
            $roles[$role][$this->_('Role')]    = $role;
            $roles[$role][$this->_('Parents')] = $privileges[\MUtil_Acl::PARENTS]   ? implode(', ', $privileges[\MUtil_Acl::PARENTS])   : null;
            $roles[$role][$this->_('Allowed')] = $privileges[\Zend_Acl::TYPE_ALLOW] ? implode(', ', $privileges[\Zend_Acl::TYPE_ALLOW]) : null;
            //$roles[$role][$this->_('Denied')]  = $privileges[\Zend_Acl::TYPE_DENY]  ? implode(', ', $privileges[\Zend_Acl::TYPE_DENY])  : null;
            $roles[$role][$this->_('Inherited')] = $privileges[\MUtil_Acl::INHERITED][\Zend_Acl::TYPE_ALLOW] ? implode(', ', $privileges[\MUtil_Acl::INHERITED][\Zend_Acl::TYPE_ALLOW]) : null;
            //$roles[$role][$this->_('Parent denied')]  = $privileges[\MUtil_Acl::INHERITED][\Zend_Acl::TYPE_DENY]  ? implode(', ', $privileges[\MUtil_Acl::INHERITED][\Zend_Acl::TYPE_DENY])  : null;
        }
        ksort($roles);

        $this->html->h2($this->_('Project role overview'));

        $this->_showTable($this->_('Roles'), $roles, true);
    }
1341448
def get_collections(self):
        
        collections = self.request.matchdict['collections'].split('/')[0]
        collections = [coll.strip() for coll in collections.split(',')]
        return set(collections)
1358845
public List<Acl> listDefaultAcls() {
    // [START listDefaultAcls]
    List<Acl> acls = bucket.listDefaultAcls();
    for (Acl acl : acls) {
      // do something with ACL entry
    }
    // [END listDefaultAcls]
    return acls;
  }
681912
public K setAcl(List<AclEntry> acl) {
    mAcl = ImmutableList.copyOf(acl);
    return getThis();
  }
234983
def _get_collection_for_user(self, collection_id, user):
        """"""
        collection_query = Collection.objects.filter(pk=collection_id)
        if not collection_query.exists():
            raise exceptions.ValidationError('Collection id does not exist')

        collection = collection_query.first()
        if not user.has_perm('add_collection', obj=collection):
            if user.is_authenticated:
                raise exceptions.PermissionDenied()
            else:
                raise exceptions.NotFound()

        return collection