diff options
Diffstat (limited to 'app/helpers/auth_helper.rb')
-rw-r--r-- | app/helpers/auth_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index cacf9c7ad0b..7cfe8ffb266 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -176,6 +176,18 @@ module AuthHelper !current_user end + def auth_app_owner_text(owner) + return unless owner + + if owner.is_a?(Group) + group_link = link_to(owner.name, group_path(owner)) + _("This application was created for group %{group_link}.").html_safe % { group_link: group_link } + else + user_link = link_to(owner.name, user_path(owner)) + _("This application was created by %{user_link}.").html_safe % { user_link: user_link } + end + end + extend self end |