mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 11:27:14 +00:00
feat(notification): add unread sidebar count badge and fix project scope upload authorization check
This commit is contained in:
@@ -110,8 +110,8 @@ describe('Upload API', () => {
|
||||
expect(res.status).toBe(200)
|
||||
expect(authzService.hasPermission).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
type: ResourceType.Team,
|
||||
id: 'team1',
|
||||
type: ResourceType.Asset,
|
||||
id: 'file1',
|
||||
permission: Permission.Edit,
|
||||
}),
|
||||
)
|
||||
|
||||
+2
-2
@@ -92,8 +92,8 @@ const route = new Hono<{ Variables: { user: User } }>()
|
||||
await authzService.hasPermission({
|
||||
user,
|
||||
permission: Permission.Edit,
|
||||
type: ResourceType.Team,
|
||||
id: teamId,
|
||||
type: ResourceType.Asset,
|
||||
id: req.fileId,
|
||||
})
|
||||
|
||||
await uploadService.confirmFileUpload(user.id, taskId, req)
|
||||
|
||||
Reference in New Issue
Block a user