Skip to content

Commit

Permalink
Merge pull request #1063 from openzim/new_role
Browse files Browse the repository at this point in the history
Add new role for external testers of the Zimfarm
  • Loading branch information
benoit74 authored Dec 16, 2024
2 parents 6b4dc7a + 9a07fae commit 805e533
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions dispatcher/backend/src/common/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class ZimPermissions(Permissions):
),
},
"editor": {"schedules": SchedulePermissions.get(create=True, update=True)},
"editor-requester": {
"tasks": TaskPermissions.get(request=True, unrequest=True, cancel=True),
"schedules": SchedulePermissions.get(create=True, update=True),
},
"worker": {
"tasks": TaskPermissions.get(create=True, update=True, cancel=True),
"zim": ZimPermissions.get(upload=True),
Expand Down
9 changes: 8 additions & 1 deletion dispatcher/frontend-ui/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,14 @@ export default {
ALERT_DEFAULT_DURATION: 5,
ALERT_LONG_DURATION: 10,
ALERT_PERMANENT_DURATION: true,
ROLES: ["editor", "manager", "admin", "worker", "processor"],
ROLES: [
"editor",
"editor-requester",
"manager",
"admin",
"worker",
"processor",
],
TOKEN_COOKIE_EXPIRY: "180D", // 6 months
COOKIE_LIFETIME_EXPIRY: "10Y", // 10 years
TOKEN_COOKIE_NAME: "auth",
Expand Down

0 comments on commit 805e533

Please sign in to comment.