Patch #37938

Unused permission "Mention user"

Added by Go MAEDA 2 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Code cleanup/refactoring
Target version:5.0.4

Description

In Permissions and Roles, you can find "Mention users" permission. However, this permission is not used at all. You can mention a user even if you don't have "Mention users" permission.

I think this unused "Mention users" permission should be removed.

diff --git a/lib/redmine/preparation.rb b/lib/redmine/preparation.rb
index b4e37fd50..9181710ba 100644
--- a/lib/redmine/preparation.rb
+++ b/lib/redmine/preparation.rb
@@ -73,7 +73,6 @@ module Redmine
           map.permission :set_notes_private, {}, :require => :member
           map.permission :delete_issues, {:issues => :destroy}, :require => :member
           map.permission :change_issue_author, {:issues => [:edit, :update]}
-          map.permission :mention_users, {}
           # Watchers
           map.permission :view_issue_watchers, {}, :read => true
           map.permission :add_issue_watchers, {:watchers => [:new, :create, :append, :autocomplete_for_user, :autocomplete_for_mention]}

Related issues

Related to Redmine - Feature #13919: Mention user on issues and wiki pages using @user with au... Closed
Related to Redmine - Patch #37974: Database migration to remove unused "mention_users" permi... New

Associated revisions

Revision 21966
Added by Marius BALTEANU 2 months ago

Remove unused mention_users permission (#37938).

Revision 21971
Added by Marius BALTEANU 2 months ago

Merge r21966 from trunk to 5.0-stable (#37938).

History

#1 Updated by Holger Just 2 months ago

  • Related to Feature #13919: Mention user on issues and wiki pages using @user with autocomplete added

#2 Updated by Holger Just 2 months ago

This appears to be a remaining artifact of the discussion around #13919#note-75. The permission indeed appears to be unused now and can be removed.

However, I'm wondering if we need to actually remove it from any roles which might have this permission defined now? Or if we could just not care?

#3 Updated by Marius BALTEANU 2 months ago

  • Assignee set to Marius BALTEANU
  • Target version set to 5.0.4

#4 Updated by Marius BALTEANU 2 months ago

  • Status changed from New to Resolved

I've removed the permission and I've added an issue (#37974) to 5.1.0 to cleanup the permission from the database.

#5 Updated by Marius BALTEANU 2 months ago

  • Related to Patch #37974: Database migration to remove unused "mention_users" permission added

#6 Updated by Marius BALTEANU about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF