mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-04 01:44:15 +00:00
make ApiKeyAuth work on non-safe routes
This commit is contained in:
1 parent
2e9e1b6a78
commit
075c6f16ec
7 files changed
+115
-26
No files matched your search
+2
-2
@@ -19,7 +19,7 @@ from pedagogy.utbm_api import UtbmApiClient
|
||||
class UvController(ControllerBase):
|
||||
@route.get(
|
||||
"/{code}",
|
||||
auth=[SessionAuth(), ApiKeyAuth()],
|
||||
auth=[ApiKeyAuth(), SessionAuth()],
|
||||
permissions=[
|
||||
# this route will almost always be called in the context
|
||||
# of a UV creation/edition
|
||||
@@ -45,7 +45,7 @@ class UvController(ControllerBase):
|
||||
"",
|
||||
response=PaginatedResponseSchema[SimpleUvSchema],
|
||||
url_name="fetch_uvs",
|
||||
auth=[SessionAuth(), ApiKeyAuth()],
|
||||
auth=[ApiKeyAuth(), SessionAuth()],
|
||||
permissions=[HasPerm("pedagogy.view_uv")],
|
||||
)
|
||||
@paginate(PageNumberPaginationExtra, page_size=100)
|
||||
|
||||
Reference in new issue
Block a user