fix(index): 修改dashboard权限,添加审计员

This commit is contained in:
Bai 2020-09-24 11:04:48 +08:00 committed by 老广
parent 7d2b49ba8c
commit 62aeaf31c6

View File

@ -10,7 +10,7 @@ from users.models import User
from assets.models import Asset
from terminal.models import Session
from orgs.utils import current_org
from common.permissions import IsOrgAdmin
from common.permissions import IsOrgAdmin, IsOrgAuditor
from common.utils import lazyproperty
__all__ = ['IndexApi']
@ -224,7 +224,7 @@ class TotalCountMixin:
class IndexApi(TotalCountMixin, WeekSessionMetricMixin, MonthLoginMetricMixin, APIView):
permission_classes = (IsOrgAdmin,)
permission_classes = [IsOrgAdmin | IsOrgAuditor]
http_method_names = ['get']
def get(self, request, *args, **kwargs):