Setting rights for user profile pages

I need to set “View” rights to all the users in XWikiAllGroup and “Edit” rights to all users in “XWikiAdminGroup” for User Profile page

I need to achieve something like below,

image

This is already what you have by default. Standard user profile creation tool add a right setup for edit for the user itself which mean only the user and anyone who have admin right can edit this page.

But it happen in reverse for me, all the users in XWikiAllGroups and XWikiAdminGroups can able to edit their or other user profile.

I don’t know what went wrong exactly.

You are 100% right. It has same right as you mentioned by default. Since i have migrated hunderds of users into group.

And the prefix “XWiki” does not contain in username added in to group that caused this issue.

ex. user name prasanthr should be in XWiki.prasanthr

Since it has hundreds of user, i have created an velocity macro to append those prefix in all. I have done the changes but after running the changes are not reflected. Here is my macro,

{{velocity}}
#set ($mydoc = $xwiki.getDocument(“XWiki.XWikiAllGroup”))
#foreach($obj in $mydoc.getObjects(“XWiki.XWikiGroups”))
#set($dummy = $obj.getXWikiObject().member.value)
#if(!$dummy.contains(“XWiki.”))
#set($newvalue = “XWiki.” + $dummy)
$obj.set(“member”, $newvalue)
$obj.getXWikiObject().member.value
#end
$mydoc.save()
#end
{{/velocity}}

Do i miss anything here :frowning:

I don’t see anything obvious just by looking at the code. $obj.getXWikiObject().member.value print the expected result ? Make sure you use the object editor instead of relying on the group UI to be safe.