mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-19 17:26:52 +00:00
fix: koko press r dont refresh user perm-nodes
This commit is contained in:
parent
b8b1a6ac9c
commit
1f1fe2084b
@ -9,6 +9,7 @@ from common.utils import get_logger, lazyproperty
|
|||||||
from perms import serializers
|
from perms import serializers
|
||||||
from perms.utils import UserPermNodeUtil
|
from perms.utils import UserPermNodeUtil
|
||||||
from .mixin import SelfOrPKUserMixin
|
from .mixin import SelfOrPKUserMixin
|
||||||
|
from .tree.mixin import RebuildTreeMixin
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ __all__ = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class BaseUserPermedNodesApi(SelfOrPKUserMixin, ListAPIView):
|
class BaseUserPermedNodesApi(SelfOrPKUserMixin, RebuildTreeMixin, ListAPIView):
|
||||||
serializer_class = serializers.NodePermedSerializer
|
serializer_class = serializers.NodePermedSerializer
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
@ -3,7 +3,6 @@ from rest_framework.response import Response
|
|||||||
from assets.api import SerializeToTreeNodeMixin
|
from assets.api import SerializeToTreeNodeMixin
|
||||||
from common.utils import get_logger
|
from common.utils import get_logger
|
||||||
|
|
||||||
from .mixin import RebuildTreeMixin
|
|
||||||
from ..nodes import (
|
from ..nodes import (
|
||||||
UserAllPermedNodesApi,
|
UserAllPermedNodesApi,
|
||||||
UserPermedNodeChildrenApi,
|
UserPermedNodeChildrenApi,
|
||||||
@ -17,7 +16,7 @@ __all__ = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class NodeTreeMixin(RebuildTreeMixin, SerializeToTreeNodeMixin):
|
class NodeTreeMixin(SerializeToTreeNodeMixin):
|
||||||
filter_queryset: callable
|
filter_queryset: callable
|
||||||
get_queryset: callable
|
get_queryset: callable
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user