I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Feature #1977

Conditional macro for users & groups

Added by Дмитрий Салашник about 12 years ago. Updated almost 10 years ago.

Status:
Open
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
16 Feb 2012
Due date:
% Done:

0%

External issue:

Description

I think something like

{{visible for some_user1, some_user2, group1, group2, role1, role2 }}
This text is invisible for other peoples :)
{{visible}}

This is really required feature, it allow’s include some technical comments for developers or something else


Related issues

Related to WikiNG - Enhancement #2229: Let reply use "user#id wrote" Closed 19 Sep 2013 16 Oct 2013

History

#1 Updated by Andriy Lesyuk about 12 years ago

  • Status changed from New to Open
  • Assignee set to Andriy Lesyuk

A good idea! Thanks!

But note that people having access to Wiki source will be able to see the invisible text...

#2 Updated by Дмитрий Салашник about 12 years ago

Andriy Lesyuk wrote:

But note that people having access to Wiki source will be able to see the invisible text...

of course

One point:
when user quotes message with hidden text (as example: on forums, comments to issues), qoute text must not contain text invisible for this user...

#3 Updated by Andriy Lesyuk about 12 years ago

  • Target version set to 1.0.0b

#4 Updated by Ivan Cenov over 10 years ago

I liked this at first, then thought about social effects. Suppose two developers sitting side by side - one allowed, other not allowed to see something. Disallowed developer looks at the monitor of the first one and sees hidden (from him) content. What he/she could think: Hey we are working together, why I am not allowed to see this?

Well, this is technical functionality. How it would be used is another issue.

#5 Updated by Andriy Lesyuk over 10 years ago

Taking the specified example the syntax should look like:

{{visible for user:some_user1, user:some_user2, group:group1, group:group2, role:role1, role:role2}}
This text is invisible for other peoples :)
{{visible}}

We need to differentiate users from groups and so on. So the syntax becomes too complex...

What about this:

{{user = s-andy}}
Content show only to user with login s-andy.
{{user}}
{{group = 'Project managers', 'Directors'}}
This content is shown only to managers.
{{group}}
{{role != "Testers"}}
Not shown to testers.
{{role}}

#6 Updated by Дмитрий Салашник over 10 years ago

this syntax dont allow give permission for group and user at the same time

#7 Updated by Andriy Lesyuk over 10 years ago

Then, probably, it should look like:

{{if(user = s-andy, group = 'Project managers', group = 'Directors')}}
Visible to user and groups
{{if}}

Your thoughts?

#8 Updated by Дмитрий Салашник over 10 years ago

This syntax looks useful

#9 Updated by Miodrag Milic over 10 years ago

This is somewhat related to #2160.

About wiki source/history, the problem is dealt with in wikicipher plugin.

About syntax, let me propose the different one. First visible to show which is easier to type

{{show +@'user 1' -@'user 2' +#'group 1' -#'group 2' +$'role 1' -$'role 2'
some text
}}

'+' could be default one in order to simplify syntax

{{show @'user 1' #'group 1' $'role 1' -@'user 2' -#'group 2' -$'role 2'
some text
}}

Another one could be to separate visible_for and not_visible_for with | symbol which kinda looks natural (visible for left group, invisible for right group)

{{show @'user 1' #'group 1' $'role 1' | @'user 2' #'group 2' $'role 2'
some text
}}

This could become easy syntax with javascript that brings up the dialog that enumerates people/group/roles on the spot after typing few letters (just like with all social network mentions).

#10 Updated by Andriy Lesyuk almost 10 years ago

  • Target version deleted (1.0.0b)

Also available in: Atom PDF

Terms of use | Privacy policy