Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from filintod/master
Browse files Browse the repository at this point in the history
fix acl role with policy
  • Loading branch information
poppyred authored Nov 30, 2020
2 parents c2596c6 + 9cbc941 commit b105755
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions consul/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,17 +1074,18 @@ def list(
:return:
"""

path = '/v1/acl/roles'
params = []
if policy:
path = '/v1/acl/roles?policy=%s' % policy
else:
path = '/v1/acl/roles'
params.append(('policy', policy))
headers = {}
token = token or self.agent.token
if token:
headers['X-Consul-Token'] = token

return self.agent.http.get(CB.json(),
path=path,
params=params,
headers=headers)

class AuthMethod(object):
Expand Down

0 comments on commit b105755

Please sign in to comment.