mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
🐛 Fix check when globalRole
is undefined
This commit is contained in:
parent
038040351a
commit
3f2c4a6645
|
@ -757,7 +757,7 @@ export function whereClause({
|
|||
}): WhereClause {
|
||||
const where: WhereClause = entityId ? { [entityType]: { id: entityId } } : {};
|
||||
|
||||
if (user.globalRole.name !== 'owner') {
|
||||
if (user?.globalRole?.name !== 'owner') {
|
||||
where.user = { id: user.id };
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue