fix: 命令存储 or 命令权限

This commit is contained in:
feng626
2022-03-08 15:11:26 +08:00
committed by Jiangjie.Bai
parent 4c31b5ec0f
commit c4a6715eb8
2 changed files with 10 additions and 2 deletions

View File

@@ -14,7 +14,6 @@ from terminal.filters import CommandStorageFilter, CommandFilter, CommandFilterF
from ..models import CommandStorage, ReplayStorage
from ..serializers import CommandStorageSerializer, ReplayStorageSerializer
__all__ = [
'CommandStorageViewSet', 'CommandStorageTestConnectiveApi',
'ReplayStorageViewSet', 'ReplayStorageTestConnectiveApi'
@@ -40,7 +39,7 @@ class CommandStorageViewSet(BaseStorageViewSetMixin, viewsets.ModelViewSet):
serializer_class = CommandStorageSerializer
filterset_class = CommandStorageFilter
rbac_perms = {
'tree': 'terminal.view_commandstorage'
'tree': 'terminal.view_commandstorage | terminal.view_command'
}
@action(methods=[GET], detail=False, filterset_class=CommandFilterForStorageTree)