Dashboard > Atlassian Plugins > ... > Plugins > Visibility Plugin
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  Visibility Plugin

Added by david , last edited by Jason Hinch on Nov 07, 2008  (view change)
Labels: 

View Customer Success Stories View Customer Success Stories View Customer Success Stories View Customer Success Stories


How can I make a context invisible in edit mode for everyone users except members of the group 'my-group'?

I think a combination of show-to and show-if will do the trick. Eg:

{show-to:group=my-group}{show-if:action=edit}Only display this to users in 'my-group' in edit mode.{show-if}{show-to}

Sorry, this is not exactly what I needed. I need to hide part of the text when other users in edit mode. But the text must be seen in the viewing mode.

So, other viewers can see the text when viewing, but not in edit mode? Could you just put the text twice, once in a {show-if:action=view} and the other in the above example? I'm not sure there is a way to have a single macro which only hides when display is edit mode and the user is not in a specific group. Mostly that's because the two tests are in separate macros. Theoretically you could just have one macro for both, but it doesn't work that way presently.

View the rest of this thread  |  4 more comments by 3 persons

I need to include an image into the page if it is created by a specific user. does not have a user parameter. Any suggestions? Thank you much,

This plugin doesn't really check on page content variables. You could do something with the Reporting Plugin, along these lines:

{report-block}
  {local-reporter}
    {user-filter:content:creator|user=specific_user_name}
  {local-reporter}

  {report-block}!//link/to/my/image!{report-block}
{report-block}

we need some v1.60 features on confluence 2.5.7. The upgrade is not available. Are these version NOT compatible, or just NOT tested. If it's the latter, can we test it, please?

I'm not sure what version 1.6.0 was compatible with. However, 1.6.0 had a couple of serious bugs which is why it's not listed at all in the plugin repository. 1.7.0 may work in earlier versions of Confluence, but it does depend on libraries which contain code which is incompatible with earlier versions, so we upped the requirements based on that. It's possible that none of the functionality used is incompatible however.

If you want to test it out, go ahead - the worst that can happen is that you have to uninstall 1.7.0 and possibly restart your Confluence server.

Let me know how it goes.



Updated by Christian Nesemann
Aug 22, 2008 00:28

So first question to this plugin:

I have created a usermacro which gets me the text out of a text-data field and transform it into a link or an email-link.

#if($param1 == "link")
[{report-info:data:$param0}]
#elseif($param1 == "mail")
[mailto:{report-info:data:$param0}]
#end

Works fine alone but when i put this macro between a {hide-if:action=edit} macro only text is shown not a link.
What do i have to change to get this to work?

regards Christian

Make sure you have Visibility 1.7.0, not 1.6. The latter has some nasty bugs when dealing with contained macros.

Otherwise, I'm not sure. Your use of {report-info} is quite unusual - I haven't tried putting a macro into a [link] markup before...

hi,

it's 1.7.

I do often unusual things

Btw. putting a reporting-macro within [] works fine. Before that i used the get-data macro .

I already tried something with $action.helper.renderConfluenceMacro(" ") but it didn't seem to work. Either with report-info (cause of no context) nor {get-data}

I also read on atlassians velocity help pages but it seems that renderConfluenceMacro has problems with some macros

Visibility rides out on the edge of what the renderer lets macros do in its efforts to essentially be invisible if the contents is not being rendered.

Probably the best thing is to create a bug report with the full details of your user macro and use of visibility macros and we'll see what we can come up with...

ok created an entry

so 17:14 here ... end of workday!

Show to "Anonymous"

We have just installed the Visibility Plug In. I want to display a line to Anonymous users to make them aware of them not being logged in. I'm using:

{show-if:user=Anonymous}
You are not LOGGED IN
{show-if}

but it is not working. What am I doing wrong?

You need the show-to macro to filter based on users. As indicated in the macro [documentation|show-to}, use the special '@anonymous' value to match to anonymous users. You can also use '@authenticated' to match the converse scenario.

Thanks for the quick reply. I'm using:

{show-to:users=@anonymous} \*You are not LOGGED IN\* {show-to}

and it is working now. Thanks for pointing me to right place for quick reference.

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators