mirror of
https://github.com/netinvent/npbackup.git
synced 2025-11-10 22:23:09 +08:00
No permission restrictions means all permissions
This commit is contained in:
parent
1d29b68e98
commit
ccf16ca12e
1 changed files with 2 additions and 1 deletions
|
|
@ -384,6 +384,7 @@ class NPBackupRunner:
|
||||||
- full: Full permissions
|
- full: Full permissions
|
||||||
|
|
||||||
Only one permission can be set per repo
|
Only one permission can be set per repo
|
||||||
|
When no permission is set, assume full permissions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@wraps(fn)
|
@wraps(fn)
|
||||||
|
|
@ -416,7 +417,7 @@ class NPBackupRunner:
|
||||||
operation = fn.__name__
|
operation = fn.__name__
|
||||||
|
|
||||||
current_permissions = self.repo_config.g("permissions")
|
current_permissions = self.repo_config.g("permissions")
|
||||||
if not current_permissions in required_permissions[operation]:
|
if current_permissions and not current_permissions in required_permissions[operation]:
|
||||||
self.write_logs(
|
self.write_logs(
|
||||||
f"Required permissions for operation '{operation}' must be in {required_permissions[operation]}, current permission is [{current_permissions}]",
|
f"Required permissions for operation '{operation}' must be in {required_permissions[operation]}, current permission is [{current_permissions}]",
|
||||||
level="critical",
|
level="critical",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue