Foren

Prevent user from editing screen name, email address, etc

Ben Starr, geändert vor 15 Jahren.

Prevent user from editing screen name, email address, etc

Regular Member Beiträge: 103 Beitrittsdatum: 27.11.07 Neueste Beiträge
It would be useful to be able to configure which values a user can edit in their profile. In particular screen name, email address, name, etc. There are times when it is not desireable to allow the user to edit these values. One example is where I have implemented auto login to create an account in Liferay from another system. In this case some or all of these values are pulled from the other system so the user should not be able to edit them in Liferay (I've implemented auto login to update the Liferay account when they user is auto logged into Liferay if the values have changed in the other system and they already have an account in Liferay). At the moment I have had to manually customise the profile page to present these values as read-only rather than input boxes but it would be much nicer if they were configurable in the enterprise admin settings (control panel in 5.2?).

Ben
thumbnail
Lisa Simpson, geändert vor 14 Jahren.

RE: Prevent user from editing screen name, email address, etc

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
Why not use CAS or some other central authentication to deal with this?
Ben Starr, geändert vor 14 Jahren.

RE: Prevent user from editing screen name, email address, etc

Regular Member Beiträge: 103 Beitrittsdatum: 27.11.07 Neueste Beiträge
Hi Lisa,

I'm integrating with an existing authentication system so I don't really have that option. In any case I'm not sure that would solve the problem because it is a the edit account page that determines what fields can be edited (not the authentication system). I think it would be useful to easily turn on/off editing of particular user account fields in any case. Sometimes system owners don't want users to be able to edit certain information and sometimes it is pulled from external systems so they shouldn't be able to edit it.

Ben
James McGovern, geändert vor 13 Jahren.

RE: Prevent user from editing screen name, email address, etc

Junior Member Beiträge: 68 Beitrittsdatum: 13.06.10 Neueste Beiträge
It would be useful to be able to configure which values a user can edit in their profile. This is less about authentication and more about authorization. The ability to say at a coarse-grained level that a user can or cannot edit their own profile is the first step. A finer level of detail goes down to the individual fields.
thumbnail
Thomas Berg, geändert vor 13 Jahren.

RE: Prevent user from editing screen name, email address, etc

Regular Member Beiträge: 131 Beitrittsdatum: 07.09.09 Neueste Beiträge
I'm also interested in this functionality. I would also like to be able to hide the entire control-panel from users lacking a certain role or group-membership.

Although it's possible to customize Liferay's database, adding missing fields and relations, I believe it's quite common to keep legacy databases while using Liferay as the front-end. As we have many other systems using the existing databases, it's not justifiable work to move information to the Liferay database.

The ability to say at a coarse-grained level that a user can or cannot edit their own profile is the first step. A finer level of detail goes down to the individual fields


I would be happy with the first step but I can also see the value of more detailed authorization. For example, even though we don't want to allow editing of screenname, email etc., it could be useful to allow other fields like portrait and social networks which we don't have in our legacy database.

/ Thomas
James McGovern, geändert vor 13 Jahren.

RE: Prevent user from editing screen name, email address, etc

Junior Member Beiträge: 68 Beitrittsdatum: 13.06.10 Neueste Beiträge
You should take a shot at writing this up and submitting it as an enhancement. Since this feature could benefit lots of people, I would think it would be prioritized high.
thumbnail
Thomas Berg, geändert vor 13 Jahren.

RE: Prevent user from editing screen name, email address, etc

Regular Member Beiträge: 131 Beitrittsdatum: 07.09.09 Neueste Beiträge
Hi James,

Seems like some of this (granularity regarding fields) has happenened already with version 6.
This was news to me so I will have check how far this goes before adding submitting any requests.

Thanks for the encouragement!

Cheers

Thomas

Below is an excerpt from portal.properties as of Liferay Portal 6.0.0

##
## Fields
##

    #
    # Set the following fields to false so users cannot see them. Some company
    # policies require gender and birthday information to always be hidden.
    #
    field.enable.com.liferay.portal.model.Contact.male=true
    field.enable.com.liferay.portal.model.Contact.birthday=true
    field.enable.com.liferay.portal.model.Organization.status=false

    #
    # Input a list of comma delimited user types who can edit their own fields.
    # Valid types are "administrator", "user-mx", and "user-without-mx".
    #
    # Set a value of "administrator" if an administrator can edit the specified
    # field. An administrator is anyone who has the Administrator role.
    #
    # Set a value of "user-mx" if a user who has an email address that matches
    # the company mail suffix can edit the specified field.
    #
    # Set a value of "user-without-mx" if a user who does not have an email
    # address that matches the company mail suffix can edit the specified field.
    #
    # Set all three values if all users can edit the specified field. Set a
    # combination of the three values if only a combination of the users can
    # edit the specified field.
    #
    field.editable.com.liferay.portal.model.User.screenName=administrator,user-with-mx,user-without-mx
    field.editable.com.liferay.portal.model.User.emailAddress=administrator,user-with-mx,user-without-mx
thumbnail
Alan Robertson, geändert vor 13 Jahren.

RE: Prevent user from editing screen name, email address, etc

New Member Beiträge: 19 Beitrittsdatum: 05.11.10 Neueste Beiträge
I tried using the following in portal-ext.properties:
field.editable.com.liferay.portal.model.User.emailAddress=administrator
field.editable.com.liferay.portal.model.User.screenName=administrator
field.editable.com.liferay.portal.model.User.firstName=administrator
field.editable.com.liferay.portal.model.User.lastName=administrator
field.editable.com.liferay.portal.model.User.middleName=administrator
field.editable.com.liferay.portal.model.User.jobTitle=administrator

But only the first two lines worked. Anyone know a way to configure Liferay so those other fields aren't editable?
thumbnail
Jacob Caniparoli, geändert vor 12 Jahren.

RE: Prevent user from editing screen name, email address, etc

Junior Member Beiträge: 27 Beitrittsdatum: 22.06.10 Neueste Beiträge
Alan Robertson:
I tried using the following in portal-ext.properties:
field.editable.com.liferay.portal.model.User.emailAddress=administrator
field.editable.com.liferay.portal.model.User.screenName=administrator
field.editable.com.liferay.portal.model.User.firstName=administrator
field.editable.com.liferay.portal.model.User.lastName=administrator
field.editable.com.liferay.portal.model.User.middleName=administrator
field.editable.com.liferay.portal.model.User.jobTitle=administrator

But only the first two lines worked. Anyone know a way to configure Liferay so those other fields aren't editable?



I am running into this same situation. Did you resolve this? Does anybody know of a way to make first name, last name, and job title read-only?
George Barelas, geändert vor 12 Jahren.

RE: Prevent user from editing screen name, email address, etc

New Member Beitrag: 1 Beitrittsdatum: 01.12.09 Neueste Beiträge
I am having the same problem, only screenName and email address become read-only. I use an LDAP server, which is managed by a custom user management system, and I don't want users thinking they can change their data through Liferay, since their data reset back to the LDAP values with each login.
thumbnail
Udaya Ramakrishnan, geändert vor 12 Jahren.

RE: Prevent user from editing screen name, email address, etc

Junior Member Beiträge: 67 Beitrittsdatum: 07.09.11 Neueste Beiträge
hi
i am also facing the same issue of making read only fields of First name, Last name, Job Title. have you find any solution?
if so, can u share with me

Thanks,
Udaya.R
thumbnail
Sandeep Nair, geändert vor 12 Jahren.

RE: Prevent user from editing screen name, email address, etc

Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Hi,

Try creating a JSP hook for details.jsp at html\portlet\enterprise_admin\user and make your required changes in the jsp

Regards,
Sandeep
thumbnail
Udaya Ramakrishnan, geändert vor 12 Jahren.

RE: Prevent user from editing screen name, email address, etc

Junior Member Beiträge: 67 Beitrittsdatum: 07.09.11 Neueste Beiträge
hi sandeep,
Done as u said and it is working now

Thanks
Udaya.R
sha sri, geändert vor 9 Jahren.

RE: Prevent user from editing screen name, email address, etc

New Member Beitrag: 1 Beitrittsdatum: 27.11.14 Neueste Beiträge
Udaya Ramakrishnan:
hi sandeep,
Done as u said and it is working now

Thanks
Udaya.R


HI Udaya,

I am new to liferay and jsp could you please share the list the changes you carried out to prevent the users from editing screen name and email address.

Thanks in advance !!


Shasri