fix(core): Fix PermissionChecker.check, and add additional unit tests (#8528)
This commit is contained in:
committed by
GitHub
parent
612771e032
commit
5832d3ca46
@@ -22,6 +22,15 @@ export class SharedWorkflowRepository extends Repository<SharedWorkflow> {
|
||||
return await this.exist({ where });
|
||||
}
|
||||
|
||||
/** Get the IDs of all users this workflow is shared with */
|
||||
async getSharedUserIds(workflowId: string) {
|
||||
const sharedWorkflows = await this.find({
|
||||
select: ['userId'],
|
||||
where: { workflowId },
|
||||
});
|
||||
return sharedWorkflows.map((sharing) => sharing.userId);
|
||||
}
|
||||
|
||||
async getSharedWorkflowIds(workflowIds: string[]) {
|
||||
const sharedWorkflows = await this.find({
|
||||
select: ['workflowId'],
|
||||
|
||||
Reference in New Issue
Block a user