Loading...
 
Skip to main content

Features / Usability


Display a list of links in a wiki page changing according to user's group

posts: 3

Hello,

What would be the best procedure to display in a wiki page, a list of links (to other wiki pages) which would vary based on current user's group?

The route which seems the most appropriate is by using the LIST plugin which I have tried in 2 different directions but to no avail:

1: Set different permissions to individual pages but full list of links is displayed on the page regardless of the current user's group. If a link to a page outside the permission of that user is clicked, an error is displayed. Not what I am looking for.

2: Reseted all wiki pages permissions to global level. Affected them to different categories to which I have set specific permissions - same result as above, all links appear regardless of the group of the current user.

I am sure I am doing something wrong and any help to point me in the right direction would be greatly appreciated - thanks in advance

Montty

posts: 257 United States

Monty,

I've been messing with a thing called Group for the WYSIWYG that should do what you need. I've found it to be a little balky and frustrating but I am able to eventually get it to do what I want.

Go to Admin/Wysiwyg and at the top of the WYSIWYG config page you'll see a button that says Toolbars. Click that and on the toolbar page look in the Plugin Tools area for "Group" Drag the icon onto the toolbar.and save.

Now when editing, type the text you want to hide, highlight it all and click the Group button. Fill in the allowed groups by name separated by a pipe (I always have to copy it from the instructions because I can never remember how to get a pipe.)

Now that part of the page is seen only by the allowed groups (or hidden from restricted groups). So two users, one in a permitted group and one forbidden can read the same page at the same time and see something completely different!


posts: 3

Thanks for your prompt input Unclegeo, greatly appreciated - actually I make it a double whammy as, although I knew about the pluginGROUP, I didn't know how to add a new icon to the tool bar of the wiki source editor - this is a great tip indeed - so thanks again 😊

pluginGROUP
This is indeed a possible route which I have explored a bit already but although it gives the desired results, it is non dynamic, I mean by this that you have to add the links in the correct group section on the wiki page containing the plugin manually and this each time you create a new wiki page.
Unless I am missing something - which is very likely possible, this direction is OK for a small amount of pages and groups and would in my case not be useable long term.

So what I am after really, is a way to get similar results as the one given by the pluginLIST when used with the categorie filter but instead of having the result filtered by categories, have it filtered by groups - is there a way to achieve this kind of results without having to hack in the pluginLIST or worst having to write a specific plugin?

Thanks again in advance for any other pointers sent my way.

PS: Re-reading my OP, I think it was misleading and not very clear - lets hope I have done a better job this time 😊

posts: 257 United States

Montty,

I think I get it;

1)Using Group I can make a specific part of a single wiki page invisible to the unwashed (in your case a link, though I've used it mostly for text).

2)I can protect pages by assigning permissions to a page but then I have to laboriously assign group permissions for every page.

3)You are going one step farther to save the trouble of assigning permissions for every page by just assigning them a category (am I getting this use of categories here?)

4)You are wanting to go a second step father and ask the question "If the pages are protected from view why show the link at all? Especially if that link's name might actually expose information. Since Tiki can hide modules, why not links?

5) These links, then would be dynamically hidden anywhere else they appeared in the wiki. Kind of like assigning permissions to a page link.

At this point you can see I am obviously way out of my league here!

posts: 3

No problems Unclegeo - as you can see I seem to have been caught by the same bug 😊

Well, I think you hit the nail on the head - this is indeed what I would like to achieve but in a dynamic way.
The GROUP plugin doesn't seem to lead to a dynamic behaviour but is fine for now (until another solution can be found) 😊

My first idea (which didn't work) has been to use the LIST plugin in conjunction of the category filter + attribution of specific permissions to each of these categories - which, adapted to your example, would be as follows:

4 categories:

  • cat1, cat2, cat3, cat4 with respective IDs: 1, 2, 3, 4
    • cat1 with permission set to tiki_p_view for group anonymous
    • cat2 with permission set to tiki_p_view for group registered
    • cat3 with permission set to tiki_p_view for group editors
    • cat4 with permission set to tiki_p_view for group trusted Illuminati


A set of wiki pages to be listed:

  • wiki pages 1 an 3 set to cat1
  • wiki pages 2,7,11,15 and 19 set to cat2
  • wiki pages 1,3,7,11,12,16 and 20 set to cat3
  • All other pages set to cat4.


A wiki page to display our dynamic list of links:

  • Mylinks - a page accessible to everyone were links will be listed based on the current user's group and to which we have added the following:
Mylinks source
Copy to clipboard
{LIST()} {filter categories="1 OR 2 OR 3 OR 4"} {filter type="wiki page"} {LIST}

When connecting as a registered user, I was hoping to see only those links for that type of user but instead I got the list of all pages.
On the other hand, clicking on the link of a page belonging to a category other than cat2, I get the rightfully so error message saying that I do not have the necessary permission to consult the page.

So... the idea is "almost working" and in my view would require to hack the LIST plugin to make it a tiny bit more clever so it doesn't display links of pages falling in the category for which the current user doesn't have tiki_p_view permission.

The beauty of such a system would allow us to set new pages to any of these categories which would then be added/removed dynamically to/from the existing list based on the user's type.

At least this seems to present itself as a possible route (which I would love to have the time to explore but don't). On the other end, it might also be very convoluted or even unnecessary when maybe other solutions already exists. My lack of knowledge of tikiwiki doesn't help in that endeavor lol...

Anyway, likewise I would like to see from others "in the know" what solution they could come up with to display dynamically a list of links based on user's type.

Thanks again to you Unclegeo and to anyone bringing more ideas 😊