diff --git a/app/views/tag/_tagging.html.erb b/app/views/tag/_tagging.html.erb index 74bef8d0f4f..8dd0cc97100 100644 --- a/app/views/tag/_tagging.html.erb +++ b/app/views/tag/_tagging.html.erb @@ -17,9 +17,11 @@ $(function () { }) +<% parent ||= nil %> + +<% if parent != :profile || (current_user && (current_user.id == @user.id || current_user.role == "admin")) %> <% url = url || "/tag/create/" + @node.id.to_s %> -<% if current_user %>
diff --git a/app/views/users/profile.html.erb b/app/views/users/profile.html.erb index 72ce4fab6eb..432090a70fc 100644 --- a/app/views/users/profile.html.erb +++ b/app/views/users/profile.html.erb @@ -234,9 +234,7 @@
- <% if current_user && (current_user.id == @user.id || current_user.role == "admin") %> - <%= render :partial => "tag/tagging", locals: { url: "/profile/tags/create/#{ @user.id }" } %> - <% end %> + <%= render :partial => "tag/tagging", locals: { url: "/profile/tags/create/#{ @user.id }", parent: :profile } %>