Allow teachers to access internal users and manage them in their study groups

This commit is contained in:
Sebastian Serth
2022-09-22 17:55:10 +02:00
committed by Sebastian Serth
parent e3018c1847
commit 0e7c38657f
11 changed files with 45 additions and 22 deletions

View File

@@ -32,12 +32,15 @@ h1 = ExternalUser.model_name.human(count: 2)
tr
th = t('activerecord.attributes.external_user.name')
th = t('activerecord.attributes.external_user.consumer')
th = t('activerecord.attributes.external_user.platform_admin')
th = t('shared.actions')
tbody
- @users.each do |user|
tr
td = link_to_if(policy(user).show?, user.displayname, user)
td = link_to_if(user.consumer.present? && policy(user.consumer).show?, user.consumer, user.consumer)
- if current_user.admin?
td = symbol_for(user.platform_admin?)
td = link_to(t('shared.show'), user) if policy(user).show?
= render('shared/pagination', collection: @users)