diff --git a/app/components/work_packages/share/invite_user_form_component.html.erb b/app/components/work_packages/share/invite_user_form_component.html.erb index 89d370ada544..0b8653bd2437 100644 --- a/app/components/work_packages/share/invite_user_form_component.html.erb +++ b/app/components/work_packages/share/invite_user_form_component.html.erb @@ -37,7 +37,8 @@ end user_limit_row.with_column do - render(Primer::Beta::Text.new(color: :danger)) { I18n.t('work_package.sharing.text_user_limit_reached', count: OpenProject::Enterprise.open_seats_count) } + render(Primer::Beta::Text.new(color: :danger)) { I18n.t("work_package.sharing.warning_user_limit_reached#{'_admin' if User.current.admin?}", + upgrade_url: OpenProject::Enterprise.upgrade_url).html_safe } end end end diff --git a/app/controllers/concerns/accounts/user_limits.rb b/app/controllers/concerns/accounts/user_limits.rb index 575136a17c7f..649e3508c91e 100644 --- a/app/controllers/concerns/accounts/user_limits.rb +++ b/app/controllers/concerns/accounts/user_limits.rb @@ -89,10 +89,16 @@ def show_user_limit_error! end def user_limit_warning - warning = I18n.t( - :warning_user_limit_reached, - upgrade_url: OpenProject::Enterprise.upgrade_url - ) + warning = if current_user.admin? + I18n.t( + :warning_user_limit_reached_admin, + upgrade_url: OpenProject::Enterprise.upgrade_url + ) + else + I18n.t( + :warning_user_limit_reached + ) + end warning.html_safe end diff --git a/app/views/members/_member_form.html.erb b/app/views/members/_member_form.html.erb index 187ccb2eed1f..fa56e3d71053 100644 --- a/app/views/members/_member_form.html.erb +++ b/app/views/members/_member_form.html.erb @@ -104,7 +104,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= I18n.t(:warning_user_limit_reached, upgrade_url: OpenProject::Enterprise.upgrade_path).html_safe %>
+<%= I18n.t("warning_user_limit_reached#{'_admin' if current_user.admin?}", upgrade_url: OpenProject::Enterprise.upgrade_url).html_safe %>