Coverage for /opt/conda/envs/apienv/lib/python3.10/site-packages/daiquiri/core/metadata/user.py: 60%
10 statements
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
« prev ^ index » next coverage.py v7.6.5, created at 2024-11-15 02:12 +0000
1class User(dict):
2 is_staff = False
4 def permission(self, permission):
5 if "permissions" in self:
6 return permission in self["permissions"]
8 def group(self, group):
9 if "groups" in self:
10 return group in self["groups"]
12 def staff(self):
13 return self["is_staff"] is True