owncloud/core — pull request #4294 by pitbulk (2013-08-02 12:04:31+00:00)
Title: Setting for disabling password and displayName change

Currently if we enable a backend that implements the setDisplayName
and the setPassword functions, then the users is allowed to change
his password, reset it or change his displayName.

In some cases, for example when using external user
auth like openid, saml, we need to disable this kind
of functionalities, but is not possible.

Reseting local passwords makes no sense when using external auth,
due external auth ignore the local password.
Showing these controls to the user in this case would only create
confusion.

Even though openid or saml backend does not implement the
setDisplayName and the setPassword functions, the
canUserChangePassword and the canUserChangeDisplayName
(of the OC_User class) loops on all the active backends
and since the OC_User_Database is active, then this functions
always returns True.

I suggest to add 2 parameters on the settings
for disabling password and displayName change.

I made an implementation that guarantee backwards compatibility.

Many people asked for this:

owncloud/core #1408
owncloud/core #3785
http://forum.owncloud.org/viewtopic.php?f=3&t=4609