Skip to content

Commit

Permalink
pre-commit formatting issues fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldor1510 committed Jul 23, 2024
1 parent 9349581 commit 5132654
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions esi_leap/common/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{"path": "/leases", "method": "GET"},
{"path": "/leases/{lease_ident}", "method": "GET"},
{"path": "/leases/{lease_ident}", "method": "DELETE"},
{"path": "/leases/{lease_ident}", "method": "PATCH"}
{"path": "/leases/{lease_ident}", "method": "PATCH"},
],
),
policy.DocumentedRuleDefault(
Expand Down Expand Up @@ -103,7 +103,7 @@
{"path": "/offers", "method": "GET"},
{"path": "/offers/{offer_ident}", "method": "GET"},
{"path": "/offers/{offer_ident}", "method": "DELETE"},
{"path": "/offers/{offer_ident}/claim", "method": "POST"}
{"path": "/offers/{offer_ident}/claim", "method": "POST"},
],
),
policy.DocumentedRuleDefault(
Expand Down Expand Up @@ -143,42 +143,35 @@
"esi_leap:node:node_admin",
"rule:is_admin",
"Complete permissions over nodes",
[
{"path": "/nodes", "method": "GET"}
],
[{"path": "/nodes", "method": "GET"}],
),
policy.DocumentedRuleDefault(
"esi_leap:node:get_all",
"rule:is_admin or rule:is_owner or rule:is_lessee",
"Retrieve multiple nodes",
[{"path": "/nodes", "method": "GET"}],
)
),
]

event_policies = [
policy.DocumentedRuleDefault(
"esi_leap:event:event_admin",
"rule:is_admin",
"Complete permissions over events",
[
{"path": "/events", "method": "GET"}
],
[{"path": "/events", "method": "GET"}],
),
policy.DocumentedRuleDefault(
"esi_leap:event:get_all",
"rule:is_admin or rule:is_owner or rule:is_lessee",
"Retrieve multiple events",
[{"path": "/events", "method": "GET"}],
)
),
]


def list_rules():
policies = itertools.chain(
default_policies,
lease_policies,
offer_policies,
node_policies,
event_policies
default_policies, lease_policies, offer_policies, node_policies, event_policies
)
return policies

Expand Down

0 comments on commit 5132654

Please sign in to comment.