Feature #4179
closedLink to user in wiki syntax
Added by Felix Schäfer about 15 years ago. Updated over 7 years ago.
0%
Description
It would be nice to have some "user" Links in the wiki syntax, something like user:3866
or user:felix
, which would the be replaced by the full name as configured in the global settings, with a link to the user page if the viewing user is entitled to seeing that page.
Files
4179_link_to_user_in_wiki_syntax.patch (7.25 KB) 4179_link_to_user_in_wiki_syntax.patch | Marius BĂLTEANU, 2017-05-07 14:16 | ||
4179_show_login_attribute_in_user_page_v2.patch (553 Bytes) 4179_show_login_attribute_in_user_page_v2.patch | Marius BĂLTEANU, 2017-05-13 17:35 | ||
4179_show_login_attribute_in_user_show_v3.patch (2.29 KB) 4179_show_login_attribute_in_user_show_v3.patch | Marius BĂLTEANU, 2017-05-14 09:17 | ||
link_to_user_profile_by_id.patch (1.43 KB) link_to_user_profile_by_id.patch | Marius BĂLTEANU, 2017-06-08 08:42 | ||
link_to_user_profile_by_id_v2.patch (1.66 KB) link_to_user_profile_by_id_v2.patch | Marius BĂLTEANU, 2017-06-16 00:13 |
Related issues
Updated by Victor Dulepov almost 15 years ago
My vote goes for this feature. Got used to that in Confluence...
Updated by Andriy Lesyuk about 12 years ago
Just wanted to let you know, that it has been implemented in WikiNG...
Updated by Mischa The Evil almost 12 years ago
- Target version set to Unplanned backlogs
Updated by Diego Antunes over 11 years ago
+1, but please check this link http://www.redmine.org/issues/13919
Updated by Jaroslav Povolný over 11 years ago
My +1 here. The most nice would be to use twitter-like annotation: Felix Schäfer
Updated by Julien Huang over 11 years ago
+1 for Twitter-like user-mention (see also #13919)
Also, this feature raises the issue about notification when a user is mentioned in an issue/wiki page/commit msg...
Updated by Toshi MARUYAMA over 11 years ago
- Has duplicate deleted (Patch #6690: Redmine link to user profile)
Updated by Toshi MARUYAMA over 11 years ago
- Related to Patch #6690: Redmine link to user profile added
Updated by Hugo da Silva da Silva about 11 years ago
+1
This would be very useful for me too. It would be nice if I could create the RACI Matrix and reference eache person by their own users page.
Updated by Toshi MARUYAMA over 8 years ago
- Category changed from Wiki to Text formatting
Updated by Marius BĂLTEANU over 7 years ago
I've attached a patch that adds two syntaxes for user links:
Marius BĂLTEANU
Marius BĂLTEANU
Users privacy is checked by this patch.
Regarding the proposed syntax with id (user:107353), even if it's easy to be added, I think that it is not worth it because is hard to retain the ids. For example, I don't know my user id from the instance that I administrate for more than 3 years.
Even if the syntax with @ required some changes in the wiki formatting (to support logins name with @), I really think that is it important to have it because the syntax "@user" is very well known and used by many applications (like: Github, Gitlab, etc).
This is another top voted feature, maybe we can include this in 3.4.0 in order to work at the mention feature (#13919) in version:3.5.0. These 2 features will improve the collaboration level.
Updated by Go MAEDA over 7 years ago
Marius BALTEANU, thank you for the patch. I really want this feature.
But I am not certain about whether the proposed implementation is proper or not because User#login is treated as secret information in the current implementation of Redmine. Please see source:trunk/app/views/users/show.html.erb@16464#L9. Only admin can see User#login.
Updated by Marius BĂLTEANU over 7 years ago
- First Name and Last Name cannot be used, it is hard to find a user after these properties and also, they are not unique.
- ID could be a solution, but without an autocomplete feature to search users like in the watchers modals it'll be hard to find their ids. Also, I find it quite strange to see "user:107353" in texts comments/wikis.
- Email addresses, but the users have the option to hide this attribute.
From my point of view, User#login is the best solution and I do not see to many disadvantages because:
- in many companies, you can easily guess the login name of your colleagues because they have the same format
- comparing with the Last Name, First Name or the email addresses, it is less considered personal data.
Of course, if you get the login name of another user, you can try some brute force to login with his user, but this "security" issue can be prevented using a mechanism like Captcha.
@Go Maeda, how do you see this implementation? I'm open to create a patch only with "user:id", but I want some feedback before. In this note (#6690#note-2), Jean-Philippe Lang said only about the user.visible? check that wasn't implemented in the respective patch.
Updated by Go MAEDA over 7 years ago
- Target version changed from Unplanned backlogs to Candidate for next major release
Marius BALTEANU wrote:
@Go Maeda, how do you see this implementation? I'm open to create a patch only with "user:id", but I want some feedback before. In this note (#6690#note-2), Jean-Philippe Lang said only about the user.visible? check that wasn't implemented in the respective patch.
I prefer using User#login as you suggested but it violates current design.
I think we should change current design of Redmine. That is, Stop handling user#login as secret information. Personally I don't think User#login as confidential. Many services treats user id as public.
Updated by Marius BĂLTEANU over 7 years ago
Go MAEDA wrote:
I prefer using User#login as you suggested but it violates current design.
I think we should change current design of Redmine. That is, Stop handling user#login as secret information. Personally I don't think User#login as confidential. Many services treats user id as public.
Totally agree. I'm going to update the patch this weekend and after that, we'll see what Jean-Philippe Lang says about this change.
Updated by Jan from Planio www.plan.io over 7 years ago
I think it's fine to not hide login names. I would think that users don't expect logins to be secret/personal today. And I also like the feature ;-)
Updated by Marius BĂLTEANU over 7 years ago
- File 4179_show_login_attribute_in_user_page.patch added
Thanks Go MAEDA and Jan for your feedback. I've attached a new patch that shows the login attribute in user page also for non admin users.
If the patch will be accepted, we can implement also #5228.
Updated by Marius BĂLTEANU over 7 years ago
- File 4179_show_login_attribute_in_user_page_v2.patch 4179_show_login_attribute_in_user_page_v2.patch added
Attached the correct one. Please remove attachment:4179_show_login_attribute_in_user_page.patch.
Updated by Jan from Planio www.plan.io over 7 years ago
- File deleted (
4179_show_login_attribute_in_user_page.patch)
Updated by Go MAEDA over 7 years ago
Marius BALTEANU wrote:
Thanks Go MAEDA and Jan for your feedback. I've attached a new patch that shows the login attribute in user page also for non admin users.
Thanks for working on this. I found that we also have to change the behavior of API.
diff --git a/app/views/users/show.api.rsb b/app/views/users/show.api.rsb
index e4c49f9b8..e711bc482 100644
--- a/app/views/users/show.api.rsb
+++ b/app/views/users/show.api.rsb
@@ -1,6 +1,6 @@
api.user do
api.id @user.id
- api.login @user.login if User.current.admin? || (User.current == @user)
+ api.login @user.login
api.firstname @user.firstname
api.lastname @user.lastname
api.mail @user.mail if User.current.admin? || !@user.pref.hide_mail
Updated by Marius BĂLTEANU over 7 years ago
- File 4179_show_login_attribute_in_user_show_v3.patch 4179_show_login_attribute_in_user_show_v3.patch added
Indeed. Thanks for pointing this out.
Updated the patch to include this change and also to fix the tests.
Updated by Go MAEDA over 7 years ago
- Target version changed from Candidate for next major release to 3.4.0
This issue has many "+1"s and watchers. Many people want this feature.
I am setting target version to 3.4.0.
Updated by Mischa The Evil over 7 years ago
Marius BALTEANU wrote:
I agree that an implementation based on User#login is ok1, but I also like to second the above quote, for two reasons:Regarding the proposed syntax with id (user:107353), even if it's easy to be added, I think that it is not worth it because is hard to retain the ids. For example, I don't know my user id from the instance that I administrate for more than 3 years.
- many people (including myself) do rely on the usage of user ids (they are easily retrievable — also for non-admins — by looking at the target of the linked [to users profile] username)
- it would make it more consistent with the existing Redmine links which all accept an id variant
1 I do however see the issue that with opening up the users' login, we make it easier for bad adversaries to bruteforce user account passwords. This might be considered a blocker for some users...
Updated by Marius BĂLTEANU over 7 years ago
Thanks for you feedback.
Mischa The Evil wrote:
I agree that an implementation based on User#login is ok1, but I also like to second the above quote, for two reasons:
- many people (including myself) do rely on the usage of user ids (they are easily retrievable — also for non-admins — by looking at the target of the linked [to users profile] username)
- it would make it more consistent with the existing Redmine links which all accept an id variant
We can do it, I'll add a new patch soon to add the functionality also for ids.
1 I do however see the issue that with opening up the users' login, we make it easier for bad adversaries to bruteforce user account passwords. This might be considered a blocker for some users...
Agree with you, but the solution for this problem is not to hide the login names (which are easily to guess in many companies), but to use a mechanism like Captcha (see my note #4179#note-43) which could be very useful on this site too.
Updated by Jean-Philippe Lang over 7 years ago
- Subject changed from Link to user in wiki syntax. to Link to user in wiki syntax
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
The patch that adds support for links to user is committed, thanks.
But I prefer to postpone the display of user logins on profiles until we get more feedback. Those who are fine with this can still use logins as display names right now.
Updated by Marius BĂLTEANU over 7 years ago
@Jean-Philippe Lang, thanks for committing this patch.
Mischa The Evil The Evil, I've attached the patch that adds support also for ingo denner (user:1).
Updated by André Lozovey over 7 years ago
In my company we have firstname.lastname as a default for user logins. Nevertheless, we have a wiki page that lists all logins so we can mention them if anyone forgets anything.
As you can see, we don't think displaying user logins is such a problem. I understand it could be a security issue, but I'm not worried about that. We encourage people to change passwords every now and then.
Jean-Philippe Lang wrote:
The patch that adds support for links to user is committed, thanks.
But I prefer to postpone the display of user logins on profiles until we get more feedback. Those who are fine with this can still use logins as display names right now.
Updated by Mischa The Evil over 7 years ago
- Related to deleted (Patch #6690: Redmine link to user profile)
Updated by Mischa The Evil over 7 years ago
- Has duplicate Patch #6690: Redmine link to user profile added
Updated by Mischa The Evil over 7 years ago
Jean-Philippe Lang wrote:
The patch that adds support for links to user is committed, thanks.
I'm glad to see this integrated. However, the current implementation is practically useless to all sites that use a user format (display name) other than the one consisting of the user login, as (regular) users won't be able to retrieve the user logins under such circumstances. This can be prevented by also adding support for a numerical variant of the link (ingo denner or more preferable user#id) like eg. provided by Marius' additional patch attached in note-56. Would you please consider that for inclusion into 3.4.0?
Jean-Philippe Lang wrote:
But I prefer to postpone the display of user logins on profiles until we get more feedback. [...]
I have opened #26127 to track that specific proposal.
Updated by Mischa The Evil over 7 years ago
Marius BALTEANU wrote:
Mischa The Evil The Evil, I've attached the patch that adds support also for ingo denner (user:1).
Thanks. I've had a look at it and it seems okay. One note though: all link keywords that take a numerical id are using #
as the separator whereas the ones that take a name, instead use the :
separator. With your patch (as also proposed by the OP of this issue) we diverge from this convention. Maybe it's better to use user#id
along with user:login
and @login
. What do you think?
Updated by Mischa The Evil over 7 years ago
- Related to Feature #26127: Display user logins on profiles added
Updated by Mischa The Evil over 7 years ago
- Status changed from Closed to Reopened
Reopened in light of note-60.
Updated by Marius BĂLTEANU over 7 years ago
Mischa The Evil wrote:
Thanks. I've had a look at it and it seems okay. One note though: all link keywords that take a numerical id are using
#
as the separator whereas the ones that take a name, instead use the:
separator. With your patch (as also proposed by the OP of this issue) we diverge from this convention. Maybe it's better to useuser#id
along withuser:login
and@login
. What do you think?
I agree with you, I'll update the patch to use the #
as separator.
Updated by Marius BĂLTEANU over 7 years ago
Here it is.
Updated by Mischa The Evil over 7 years ago
Updated by Mischa The Evil over 7 years ago
- Related to Patch #26188: Documentation (detailed syntax help & code) additions/improvements added
Updated by Vu Anh over 7 years ago
Seem it isn't working well with syntax "user:abc@example.com" (Login name contain "@" character)
Updated by Go MAEDA over 7 years ago
Vu Anh wrote:
Seem it isn't working well with syntax "user:abc@example.com" (Login name contain "@" character)
This issue has been closed and the feature has already been delivered. Could you open a new issue to report the problem?
Updated by Mischa The Evil over 7 years ago
- Related to Defect #26443: User link syntax (user:login) doesn't work for logins consisting of an email adress added
Updated by Mischa The Evil over 7 years ago
Go MAEDA wrote:
Vu Anh wrote:
Seem it isn't working well with syntax "user:abc@example.com" (Login name contain "@" character)
This issue has been closed and the feature has already been delivered. Could you open a new issue to report the problem?
Done. #26443.
@Vu Anh: you can alternatively use the short syntax (@abc@example.com
), which should work fine.
Updated by Go MAEDA over 7 years ago
- Related to Defect #26892: Link to user in wiki syntax only works when login is written in lower case added