Check for invalid consumer in user views

Fix CODEOCEAN-S4
This commit is contained in:
Sebastian Serth
2023-08-16 23:05:07 +02:00
parent 87a75ce2bf
commit 57ff38c2b1
3 changed files with 3 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ h1 = InternalUser.model_name.human(count: 2)
- @users.each do |user|
tr
td = link_to_if(policy(user).show?, user.name, user)
td = user.consumer ? link_to_if(policy(user.consumer).show?, user.consumer, user.consumer) : empty
td = user.consumer ? link_to_if(user.consumer.present? && policy(user.consumer).show?, user.consumer, user.consumer) : empty
- if current_user.admin?
td = symbol_for(user.platform_admin?)
td = link_to(t('shared.show'), user) if policy(user).show?