basyx commited on
Commit
d8f4127
·
verified ·
1 Parent(s): cf9dee4

Authorize manual generation retries as new requests

Browse files
Files changed (1) hide show
  1. app/security/policy.py +2 -0
app/security/policy.py CHANGED
@@ -134,6 +134,8 @@ class ScopePolicy:
134
  return "generation:providers:read"
135
  if path.endswith("/cancel"):
136
  return "generation:jobs:cancel"
 
 
137
  if "/jobs/" in path or method == "GET":
138
  return "generation:requests:read"
139
  return "generation:requests:create"
 
134
  return "generation:providers:read"
135
  if path.endswith("/cancel"):
136
  return "generation:jobs:cancel"
137
+ if path.endswith("/retry") and method == "POST":
138
+ return "generation:requests:create"
139
  if "/jobs/" in path or method == "GET":
140
  return "generation:requests:read"
141
  return "generation:requests:create"