Hello,
I wan’t to disable the activity stream in the user profile pages, especially the posibility for user A to see what user B did.
The main goal is to disable features for users to monitor other users, as this could violate some labor laws in my country.
Is there an easy way of doing so without adding a bunch more scripts?
I found this snippet: Initialize rights of user profiles (Extension.Initialize rights of user profiles.WebHome) - XWiki but that seems way to complicated to me for what I wan’t to achive.
Is there an easier out of the box way?
Thank you and kind regards
Hello,
I find this funny because that’s exactly the purpose of a wiki, to be able to see what others did, and be able to rollback when needed! (vs having a workflow to validate any change for example which is the non-wiki way).
Honestly, I don’t think XWiki is a good fit for this need as it would be hard to prevent users from seeing what others did, just by checking the page history for example.
Ok sorry, I maybe expressed myself inadequately, of course we want to keep all typical XWIKI features and their workflow like history of a page and being able to see who did what changes, compare them an roll back and so on.
But the activity stream on user profiles, which easly allows users to see what other users did is something that could easily be abused by supervisors / managers to theoretically (and mostly wrongfully) determine the performance of staff. That could therefore become an issue with the labour law.
In my assessment the activity stream of another user profile is by far the most “problematic”, so if possible I would like to disable that alone and still keep everything else “normal”.
Currently there is an easy setting under Global Administration>User Profile>Displayed sections to limit what a User Profile Contains (by default personal, contact, links) but the activity stream is not hidable easily to my knowledge.
Is there an easy way to disable or take out the activity stream of the user pages? Or would the only solution be, to change the permissions of the whole user profile pages to only the user himself and admin (like the linked snippet can do apperently)?
Kind Regards
To remove just the activity stream, you’ll need to:
- edit the
XWiki.XWikiUserProfileSheet
page and remove the call to {{notifications useUserPreferences="false" displayOwnEvents="true" users="${doc.prefixedFullName}" displayRSSLink="false" /}}
- edit the
XWiki.XWikiUserNetworkSheet
page and remove the call to {{notifications displayWatchedUsersOnly="true"}}
Ofc since you’re modifying default wiki pages of the XWiki distribution, whenever you upgrade XWiki, you’ll need to review/merge changes. However XWiki helps you to resole any conflict by showing you the diffs when you upgrade.
Ofc if you can do this, then it’s the simplest and the best by far, but any admin would still be able to see the activity stream.
You can do it manually for all user pages or script it, or have an Event Listener that does it automatically (as is the case for https://snippets.xwiki.org/xwiki/bin/view/Extension/Initialize%20rights%20of%20user%20profiles/ ).
Hope it helps,
2 Likes
Is it possible to deactivate the Watch/Unwatch button for notifications while still being able to see your own or someone else’s activity stream if you navigate to a user’s profile? The two components feel distinct to me.
Sorry that im probably asking that dumb question where can I find these script passages?
Are these modifications (remove these calls) to be done in the XWIKI.JavaScriptExtenstion objects of the two pages or where can I find them?
/xwiki/bin/edit/XWiki/XWikiUserProfileSheet has very little velocity code,
/xwiki/bin/view/XWiki/XWikiUserNetworkSheet has none at all.
Ok changing permissions to the user profiles (which can be done with the snippet) also deactivates even more than expected, even macros like the Mentions are becomming next to disabled.
So basically the only way for me is to disable the Activity Stream in the user profile, which I still am trying to figure out how.
Also in the long term I think it would be very great if the activity stream could be activated/deactivated like the “Displayed sections” within the User Profile settings with the text field SECTION IDs or like the “Panels” with the text field PANELS DISPLAYED ON THE…
Hallo today I finally understood that part of XWIKI, all the time I had searched in the wrong places: I serched in the editor of these extension pages (if they had velocity codes) and the XWiki.JavaScriptExtension Objects of these extension pages.
But the code you referring to and needs to be changed is in the XWiki.UIExtensionClass of the extension pages, which I forgot to check efen though it makes way more sense there.
So now that the activity stream is hidden from the profile pages the problem solved for me. Also the fix is easy enough (now that I understood it ) to be reapplied after each update.
Of course in the long term an gui setting under the normal admin section for user profiles to enable/disable the activity stream could be very helpfull, easpecially if others face the same problematic.
It is truly fascinating and great how flexible XWIKI can be used an modified!
Thank you very much for your help an effort!