mirror of
https://github.com/n8n-io/n8n.git
synced 2026-12-04 08:42:01 +00:00
🐛 Fix check when globalRole is undefined
This commit is contained in:
1 parent
038040351a
commit
3f2c4a6645
1 file changed
+1
-1
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user