mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
9a1cc56806
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
36 lines
956 B
TypeScript
36 lines
956 B
TypeScript
import Container from 'typedi';
|
|
import { RoleService } from '@/services/role.service';
|
|
|
|
export async function getGlobalOwnerRole() {
|
|
return await Container.get(RoleService).findGlobalOwnerRole();
|
|
}
|
|
|
|
export async function getGlobalMemberRole() {
|
|
return await Container.get(RoleService).findGlobalMemberRole();
|
|
}
|
|
|
|
export async function getGlobalAdminRole() {
|
|
return await Container.get(RoleService).findGlobalAdminRole();
|
|
}
|
|
|
|
export async function getWorkflowOwnerRole() {
|
|
return await Container.get(RoleService).findWorkflowOwnerRole();
|
|
}
|
|
|
|
export async function getWorkflowEditorRole() {
|
|
return await Container.get(RoleService).findWorkflowEditorRole();
|
|
}
|
|
|
|
export async function getCredentialOwnerRole() {
|
|
return await Container.get(RoleService).findCredentialOwnerRole();
|
|
}
|
|
|
|
export async function getAllRoles() {
|
|
return await Promise.all([
|
|
getGlobalOwnerRole(),
|
|
getGlobalMemberRole(),
|
|
getWorkflowOwnerRole(),
|
|
getCredentialOwnerRole(),
|
|
]);
|
|
}
|