mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02: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 New Issue
Block a user