feat: Replace owner checks with scope checks (no-changelog) (#7846)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -21,7 +21,7 @@ export class WorkflowHistoryService {
|
||||
private async getSharedWorkflow(user: User, workflowId: string): Promise<SharedWorkflow | null> {
|
||||
return this.sharedWorkflowRepository.findOne({
|
||||
where: {
|
||||
...(!user.isOwner && { userId: user.id }),
|
||||
...(!(await user.hasGlobalScope('workflow:read')) && { userId: user.id }),
|
||||
workflowId,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user