Skip to content
Snippets Groups Projects
Unverified Commit 10d18fb6 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

FIX: only parse Grant and Deny tags in get_permissions

parent a50b79f5
No related branches found
No related tags found
No related merge requests found
...@@ -251,11 +251,12 @@ class PermissionRule(): ...@@ -251,11 +251,12 @@ class PermissionRule():
xml = etree.fromstring(body) xml = etree.fromstring(body)
ret = set() ret = set()
for c in xml: for c in xml:
ret.add(PermissionRule._parse_element(c)) if c.tag in ["Grant", "Deny"]:
ret.add(PermissionRule._parse_element(c))
return ret return ret
def __str__(self): def __str__(self):
return self._action + "(" + self._permission + ")" + \ return str(self._action) + "(" + str(self._permission) + ")" + \
("P" if self._priority is True else "") ("P" if self._priority is True else "")
def __repr__(self): def __repr__(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment