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

View File

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

View File

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