mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Allow reading amavis parameters to everyone
This commit is contained in:
@@ -93,6 +93,8 @@ class GlobalParametersViewSet(BaseParametersViewSet):
|
||||
|
||||
def get_permissions(self):
|
||||
if self.action == "retrieve":
|
||||
if self.kwargs.get("pk") == "amavis":
|
||||
return [permissions.IsAuthenticated()]
|
||||
return [permissions.IsAuthenticated(), IsPrivilegedUser()]
|
||||
return [permissions.IsAuthenticated(), IsSuperUser()]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user