mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
32 lines
808 B
TypeScript
32 lines
808 B
TypeScript
import Container from 'typedi';
|
|
import { RoleService } from '@/services/role.service';
|
|
|
|
export async function getGlobalOwnerRole() {
|
|
return Container.get(RoleService).findGlobalOwnerRole();
|
|
}
|
|
|
|
export async function getGlobalMemberRole() {
|
|
return Container.get(RoleService).findGlobalMemberRole();
|
|
}
|
|
|
|
export async function getWorkflowOwnerRole() {
|
|
return Container.get(RoleService).findWorkflowOwnerRole();
|
|
}
|
|
|
|
export async function getWorkflowEditorRole() {
|
|
return Container.get(RoleService).findWorkflowEditorRole();
|
|
}
|
|
|
|
export async function getCredentialOwnerRole() {
|
|
return Container.get(RoleService).findCredentialOwnerRole();
|
|
}
|
|
|
|
export async function getAllRoles() {
|
|
return Promise.all([
|
|
getGlobalOwnerRole(),
|
|
getGlobalMemberRole(),
|
|
getWorkflowOwnerRole(),
|
|
getCredentialOwnerRole(),
|
|
]);
|
|
}
|