fix(search): only search record kinds the caller may read
search:read alone returned apiary names, colony and queen codes, task titles and batch numbers to roles without the matching read permission. Each kind of result is now searched only when apiaries:read, colonies:read, queens:read, tasks:read or honey-batches:read is held. The search term is validated (string, at most 100 characters). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
0ba8996e3a
commit
eafe925d60
4 files changed
+105
-26
No files matched your search
@@ -0,0 +1,10 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsOptional, IsString, MaxLength } from 'class-validator';
|
||||
|
||||
export class SearchQueryDto {
|
||||
@ApiPropertyOptional({ description: 'Suchbegriff' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(100)
|
||||
q?: string;
|
||||
}
|
||||
Reference in new issue
Block a user