Skip to content

Commit

Permalink
Merge pull request #1110 from longguikeji/release-2.5.1-beta
Browse files Browse the repository at this point in the history
Release 2.5.1 beta
  • Loading branch information
welylongguikeji authored Aug 1, 2022
2 parents 3669022 + 816268d commit ee8a7d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/v1/schema/permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
)

class PermissionListSchemaOut(ModelSchema):
class PermissionsListSchemaOut(ModelSchema):

app_name: str = Field(default=None, alias="app.name", title=_("应用名称"))
sort_id: int = Field(hidden=True)
Expand All @@ -29,7 +29,7 @@ class PermissionListSchemaOut(ModelSchema):

class Config:
model = Permission
model_fields = ['id', 'name', 'is_system', 'is_open']
model_fields = ['id', 'name', 'is_system']


class PermissionSchemaOut(Schema):
Expand Down
2 changes: 1 addition & 1 deletion api/v1/schema/tenant.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TenantConfigItemOut(Schema):
title=_("租户名称"),
)

slug: str = Field(
slug: Optional[str] = Field(
title=_("slug")
)

Expand Down
6 changes: 3 additions & 3 deletions api/v1/views/permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def create_permission(request, tenant_id: str, data: PermissionCreateSchemaIn):
return ErrorDict(ErrorCode.OK)


@api.get("/tenant/{tenant_id}/permissions", response=List[PermissionListSchemaOut], tags=['权限'])
@api.get("/tenant/{tenant_id}/permissions", response=List[PermissionsListSchemaOut], tags=['权限'])
@operation(roles=[TENANT_ADMIN, PLATFORM_ADMIN])
@paginate(CustomPagination)
def list_permissions(request, tenant_id: str, app_id: str = None, select_user_id: str = None, group_id: str = None, app_name: str = None, category: str = None):
Expand All @@ -57,7 +57,7 @@ def list_permissions(request, tenant_id: str, app_id: str = None, select_user_i
return permissiondata.get_permissions_by_search(tenant_id, app_id, select_user_id, group_id, login_user, app_name=app_name, category=category)


@api.get("/tenant/{tenant_id}/childmanager_permissions", response=List[PermissionListSchemaOut], tags=['权限'])
@api.get("/tenant/{tenant_id}/childmanager_permissions", response=List[PermissionsListSchemaOut], tags=['权限'])
@operation(roles=[TENANT_ADMIN, PLATFORM_ADMIN])
@paginate(CustomPagination)
def childmanager_permissions(request, tenant_id: str, only_show_group: int = 0):
Expand Down Expand Up @@ -226,7 +226,7 @@ def usergroup_remove_permission(request, tenant_id: str, select_usergroup_id: st
return ErrorDict(ErrorCode.OK)


@api.get("/tenant/{tenant_id}/group_permissions", response=List[PermissionListSchemaOut], tags=['权限'])
@api.get("/tenant/{tenant_id}/group_permissions", response=List[PermissionsListSchemaOut], tags=['权限'])
@operation(roles=[TENANT_ADMIN, PLATFORM_ADMIN])
@paginate(CustomPagination)
def list_group_permissions(request, tenant_id: str, select_usergroup_id: str = None, app_name: str = None, category: str = None):
Expand Down

0 comments on commit ee8a7d9

Please sign in to comment.