Disable possibility user to edit profile

How to disable possibility user to edit profile? Keep only view.

I don’t think you can. It’s done on purpose so that the user can always change their password and their details. What’s your use case for preventing them to change their information?

thanks

I use openid and set data from azure. User can change own data but it will be overwriten on next login - thats good. But just only know how to disable edit, because there is no need to change password and any other data.

ok that’s a good use case actually :slight_smile: Would be great if you could create an issue about it at http://jira.xwiki.org/projects/XWIKI/summary Thx

It is possible to disable a lot of the ‘xwiki-platform-user-profile-ui’ extensions functionality. This can be done by editing the velocity pages in the extension. For example I change line 189 of XWikiUserPreferencesSheet.xml to read #if(($hasAdmin) && ($xcontext.action == 'view') && so the user does not see the password change button for their own profile.

Most users will not then change their password. However it is possible for them to do so by using a URL like bin/view/XWiki/theusername?xpage=passwd

I am not sure how the xpage=passwd parameter works or where the page is that is then shown. It certainly does not seem to be in the ‘xwiki-platform-user-profile-ui’ extensions.

It would be great to know how to disable this but it seems to be in the core of xwiki!

xpage=password means that the password.vm will be called. You can edit that template or create a custom skin and provide a custom template for it (see https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/passwd.vm ).