Skip to content

Commit

Permalink
feat: add data source & tenant sync lock (#1888)
Browse files Browse the repository at this point in the history
  • Loading branch information
narasux authored Aug 23, 2024
1 parent 0ccb668 commit f2c2c87
Show file tree
Hide file tree
Showing 39 changed files with 1,164 additions and 670 deletions.
3 changes: 2 additions & 1 deletion src/bk-user/bkuser/apis/web/organization/views/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

import itertools

from django.db import transaction
Expand Down Expand Up @@ -156,7 +157,7 @@ def patch(self, request, *args, **kwargs):
return Response(status=status.HTTP_204_NO_CONTENT)


class TenantDeptUserRelationBatchDeleteApi(CurrentUserTenantDataSourceMixin, generics.CreateAPIView):
class TenantDeptUserRelationBatchDeleteApi(CurrentUserTenantDataSourceMixin, generics.DestroyAPIView):
"""批量删除指定部门 & 用户的部门 - 用户关系"""

permission_classes = [IsAuthenticated, perm_class(PermAction.MANAGE_TENANT)]
Expand Down
1 change: 1 addition & 0 deletions src/bk-user/bkuser/apps/sync/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

import re

from blue_krill.data_types.enum import EnumField, StructuredEnum
Expand Down
358 changes: 0 additions & 358 deletions src/bk-user/bkuser/apps/sync/context.py

This file was deleted.

15 changes: 15 additions & 0 deletions src/bk-user/bkuser/apps/sync/contexts/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

from .data_source import DataSourceSyncTaskContext
from .tenant import TenantSyncTaskContext

__all__ = ["DataSourceSyncTaskContext", "TenantSyncTaskContext"]
Loading

0 comments on commit f2c2c87

Please sign in to comment.