Skip to content

Commit

Permalink
Merge pull request #482 from nannan00/fix_scope_update_error
Browse files Browse the repository at this point in the history
fix(scope update): support id and action_id
  • Loading branch information
nannan00 authored Dec 6, 2021
2 parents 8e8625f + 5d2b0d6 commit 02596f1
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
6 changes: 6 additions & 0 deletions release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# V1.5.15

### 缺陷修复
* 修复LongTask改同步后, celery_id获取为None的问题
* 修复分级管理员权限Scope数据结构不兼容action_id问题

# V1.5.14

### 新增功能
Expand Down
2 changes: 1 addition & 1 deletion saas/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.14
1.5.15
2 changes: 1 addition & 1 deletion saas/backend/long_task/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def run(self, id: int):

params = handler.get_params()

celery_id = self.request.id
celery_id = self.request.id or ""
TaskDetail.objects.filter(pk=id).update(
celery_id=celery_id,
status=TaskStatus.RUNNING.value, # type: ignore[attr-defined]
Expand Down
7 changes: 5 additions & 2 deletions saas/backend/service/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from django.db import transaction
from django.utils.translation import gettext as _
from pydantic import BaseModel, parse_obj_as
from pydantic import BaseModel, Field, parse_obj_as

from backend.apps.role.models import (
Role,
Expand All @@ -37,9 +37,12 @@


class AuthScopeAction(BaseModel):
id: str
id: str = Field(alias="action_id")
related_resource_types: List[RelatedResource]

class Config:
allow_population_by_field_name = True # 支持alias字段同时传 action_id 与 id


class AuthScopeSystem(BaseModel):
system_id: str
Expand Down
5 changes: 5 additions & 0 deletions saas/resources/version_log/V1.5.15_2021-12-06.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# V1.5.15 版本更新日志

### 缺陷修复
* 修复LongTask改同步后, celery_id获取为None的问题
* 修复分级管理员权限Scope数据结构不兼容action_id问题
5 changes: 5 additions & 0 deletions saas/resources/version_log/V1.5.15_2021-12-06_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# V1.5.15 ChangeLog

### Bug Fixes
* Fixed the issue that celery_id was obtained as None after LongTask changed synchronization
* Fixed the issue of incompatible action_id with the Scope data structure of the hierarchical administrator authority

0 comments on commit 02596f1

Please sign in to comment.