refactor(core): Remove roleId indirection (no-changelog) (#8413)
This commit is contained in:
committed by
GitHub
parent
1affebd85e
commit
d6deceacde
@@ -34,10 +34,10 @@ export class EnterpriseWorkflowService {
|
||||
user,
|
||||
workflowId,
|
||||
{ allowGlobalScope: false },
|
||||
['workflow', 'role'],
|
||||
['workflow'],
|
||||
);
|
||||
|
||||
if (!sharing || sharing.role.name !== 'owner') return { ownsWorkflow: false };
|
||||
if (!sharing || sharing.role !== 'workflow:owner') return { ownsWorkflow: false };
|
||||
|
||||
const { workflow } = sharing;
|
||||
|
||||
@@ -54,7 +54,7 @@ export class EnterpriseWorkflowService {
|
||||
workflow.shared?.forEach(({ user, role }) => {
|
||||
const { id, email, firstName, lastName } = user;
|
||||
|
||||
if (role.name === 'owner') {
|
||||
if (role === 'workflow:owner') {
|
||||
workflow.ownedBy = { id, email, firstName, lastName };
|
||||
return;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ export class EnterpriseWorkflowService {
|
||||
};
|
||||
credential.shared?.forEach(({ user, role }) => {
|
||||
const { id, email, firstName, lastName } = user;
|
||||
if (role.name === 'owner') {
|
||||
if (role === 'credential:owner') {
|
||||
workflowCredential.ownedBy = { id, email, firstName, lastName };
|
||||
} else {
|
||||
workflowCredential.sharedWith?.push({ id, email, firstName, lastName });
|
||||
|
||||
Reference in New Issue
Block a user