mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-22 13:21:50 +08:00
🐛 Fix check when globalRole is undefined
This commit is contained in:
@@ -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