feat: remove common role permission limit

This commit is contained in:
louis 2024-04-07 11:14:47 +08:00
parent 2f5d6831ab
commit 1597fd8019
3 changed files with 0 additions and 12 deletions

View File

@ -13,9 +13,7 @@ import { DictItemDto, DictItemQueryDto } from './dict-item.dto';
import { DictItemService } from './dict-item.service';
export const permissions = definePermission('system:dict-item', {
LIST: 'list',
CREATE: 'create',
READ: 'read',
UPDATE: 'update',
DELETE: 'delete'
} as const);
@ -29,7 +27,6 @@ export class DictItemController {
@Get()
@ApiOperation({ summary: '获取字典项列表' })
@ApiResult({ type: [DictItemEntity], isPage: true })
@Perm(permissions.LIST)
async list(@Query() dto: DictItemQueryDto): Promise<Pagination<DictItemEntity>> {
return this.dictItemService.page(dto);
}
@ -37,7 +34,6 @@ export class DictItemController {
@Get('all/:typeId')
@ApiOperation({ summary: '一次性通过字典类型获取所有所属的字典项(不分页)' })
@ApiResult({ type: [DictItemEntity] })
@Perm(permissions.LIST)
async getAll(@Param('typeId') typeId: number): Promise<DictItemEntity[]> {
return this.dictItemService.getAllByType(typeId);
}

View File

@ -13,9 +13,7 @@ import { DictTypeDto, DictTypeQueryDto } from './dict-type.dto';
import { DictTypeService } from './dict-type.service';
export const permissions = definePermission('system:dict-type', {
LIST: 'list',
CREATE: 'create',
READ: 'read',
UPDATE: 'update',
DELETE: 'delete'
} as const);
@ -29,7 +27,6 @@ export class DictTypeController {
@Get()
@ApiOperation({ summary: '获取字典类型列表' })
@ApiResult({ type: [DictTypeEntity], isPage: true })
@Perm(permissions.LIST)
async list(@Query() dto: DictTypeQueryDto): Promise<Pagination<DictTypeEntity>> {
return this.dictTypeService.page(dto);
}
@ -37,7 +34,6 @@ export class DictTypeController {
@Post('all')
@ApiOperation({ summary: '一次性获取所有的字典类型(不分页)' })
@ApiResult({ type: [DictTypeEntity] })
@Perm(permissions.LIST)
async getAll(@Body() dto: DictTypeQueryDto): Promise<DictTypeEntity[]> {
return this.dictTypeService.getAll(dto);
}
@ -54,7 +50,6 @@ export class DictTypeController {
@Get(':id')
@ApiOperation({ summary: '查询字典类型信息' })
@ApiResult({ type: DictTypeEntity })
@Perm(permissions.READ)
async info(@IdParam() id: number): Promise<DictTypeEntity> {
return this.dictTypeService.findOne(id);
}

View File

@ -28,7 +28,6 @@ export class ParamConfigController {
@Get()
@ApiOperation({ summary: '获取参数配置列表' })
@ApiResult({ type: [ParamConfigEntity], isPage: true })
@Perm(permissions.LIST)
async list(@Query() dto: ParamConfigQueryDto): Promise<Pagination<ParamConfigEntity>> {
return this.paramConfigService.page(dto);
}
@ -44,7 +43,6 @@ export class ParamConfigController {
@Get('key/:code')
@ApiOperation({ summary: '查询参数配置信息By key' })
@ApiResult({ type: String })
@Perm(permissions.READ)
async code(@Param('code') code: string): Promise<string> {
return this.paramConfigService.findValueByKey(code);
}
@ -52,7 +50,6 @@ export class ParamConfigController {
@Get(':id')
@ApiOperation({ summary: '查询参数配置信息' })
@ApiResult({ type: ParamConfigEntity })
@Perm(permissions.READ)
async info(@IdParam() id: number): Promise<ParamConfigEntity> {
return this.paramConfigService.findOne(id);
}