Fix permission_class method [SCI-11953]

This commit is contained in:
Martin Artnik 2025-07-10 13:39:40 +02:00
parent be8b5e8bf5
commit 65af2ee44f

View file

@ -26,11 +26,11 @@ module PermissionCheckableModel
where(id: with_granted_user_permissions.reselect(:id)) where(id: with_granted_user_permissions.reselect(:id))
.or(where(id: with_granted_group_permissions.reselect(:id))) .or(where(id: with_granted_group_permissions.reselect(:id)))
} }
end
def self.permission_class def self.permission_class
self self
end end
end
def permission_granted?(user, permission) def permission_granted?(user, permission)
return true if user_assignments.joins(:user_role) return true if user_assignments.joins(:user_role)