mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-16 18:05:25 +08:00
Add init to all possible permissions
This commit is contained in:
parent
04ff740576
commit
57be8ea99a
1 changed files with 3 additions and 2 deletions
|
@ -452,8 +452,8 @@ class NPBackupRunner:
|
|||
Decorator that checks permissions before running functions
|
||||
|
||||
Possible permissions are:
|
||||
- backup: Backup and list backups
|
||||
- restore: Backup, restore, recover and list snapshots
|
||||
- backup: Init, Backup and list backups
|
||||
- restore: Init, Backup, restore, recover and list snapshots
|
||||
- full: Full permissions
|
||||
|
||||
Only one permission can be set per repo
|
||||
|
@ -463,6 +463,7 @@ class NPBackupRunner:
|
|||
@wraps(fn)
|
||||
def wrapper(self, *args, **kwargs):
|
||||
required_permissions = {
|
||||
"init": ["backup", "restore", "full"],
|
||||
"backup": ["backup", "restore", "full"],
|
||||
"has_recent_snapshot": ["backup", "restore", "full"],
|
||||
"snapshots": ["backup", "restore", "full"],
|
||||
|
|
Loading…
Add table
Reference in a new issue