Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ben Starr
Prevent user from editing screen name, email address, etc
March 12, 2009 4:00 PM
Answer

Ben Starr

Rank: Regular Member

Posts: 103

Join Date: November 26, 2007

Recent Posts

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
Lisa Simpson
RE: Prevent user from editing screen name, email address, etc
September 11, 2009 12:31 PM
Answer

Lisa Simpson

Rank: Liferay Legend

Posts: 2034

Join Date: March 5, 2009

Recent Posts

Why not use CAS or some other central authentication to deal with this?
Ben Starr
RE: Prevent user from editing screen name, email address, etc
September 17, 2009 10:11 PM
Answer

Ben Starr

Rank: Regular Member

Posts: 103

Join Date: November 26, 2007

Recent Posts

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
RE: Prevent user from editing screen name, email address, etc
June 17, 2010 10:12 AM
Answer

James McGovern

Rank: Junior Member

Posts: 69

Join Date: June 13, 2010

Recent Posts

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.
Thomas Berg
RE: Prevent user from editing screen name, email address, etc
June 18, 2010 12:32 AM
Answer

Thomas Berg

Rank: Regular Member

Posts: 125

Join Date: September 7, 2009

Recent Posts

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
RE: Prevent user from editing screen name, email address, etc
June 23, 2010 11:24 AM
Answer

James McGovern

Rank: Junior Member

Posts: 69

Join Date: June 13, 2010

Recent Posts

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.
Thomas Berg
RE: Prevent user from editing screen name, email address, etc
August 1, 2010 1:36 PM
Answer

Thomas Berg

Rank: Regular Member

Posts: 125

Join Date: September 7, 2009

Recent Posts

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

 1##
 2## Fields
 3##
 4
 5    #
 6    # Set the following fields to false so users cannot see them. Some company
 7    # policies require gender and birthday information to always be hidden.
 8    #
 9    field.enable.com.liferay.portal.model.Contact.male=true
10    field.enable.com.liferay.portal.model.Contact.birthday=true
11    field.enable.com.liferay.portal.model.Organization.status=false
12
13    #
14    # Input a list of comma delimited user types who can edit their own fields.
15    # Valid types are "administrator", "user-mx", and "user-without-mx".
16    #
17    # Set a value of "administrator" if an administrator can edit the specified
18    # field. An administrator is anyone who has the Administrator role.
19    #
20    # Set a value of "user-mx" if a user who has an email address that matches
21    # the company mail suffix can edit the specified field.
22    #
23    # Set a value of "user-without-mx" if a user who does not have an email
24    # address that matches the company mail suffix can edit the specified field.
25    #
26    # Set all three values if all users can edit the specified field. Set a
27    # combination of the three values if only a combination of the users can
28    # edit the specified field.
29    #
30    field.editable.com.liferay.portal.model.User.screenName=administrator,user-with-mx,user-without-mx
31    field.editable.com.liferay.portal.model.User.emailAddress=administrator,user-with-mx,user-without-mx
Alan Robertson
RE: Prevent user from editing screen name, email address, etc
January 19, 2011 10:44 AM
Answer

Alan Robertson

Rank: New Member

Posts: 19

Join Date: November 4, 2010

Recent Posts

I tried using the following in portal-ext.properties:
1field.editable.com.liferay.portal.model.User.emailAddress=administrator
2field.editable.com.liferay.portal.model.User.screenName=administrator
3field.editable.com.liferay.portal.model.User.firstName=administrator
4field.editable.com.liferay.portal.model.User.lastName=administrator
5field.editable.com.liferay.portal.model.User.middleName=administrator
6field.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?
Jacob Caniparoli
RE: Prevent user from editing screen name, email address, etc
July 15, 2011 2:12 PM
Answer

Jacob Caniparoli

Rank: Junior Member

Posts: 26

Join Date: June 22, 2010

Recent Posts

Alan Robertson:
I tried using the following in portal-ext.properties:
1field.editable.com.liferay.portal.model.User.emailAddress=administrator
2field.editable.com.liferay.portal.model.User.screenName=administrator
3field.editable.com.liferay.portal.model.User.firstName=administrator
4field.editable.com.liferay.portal.model.User.lastName=administrator
5field.editable.com.liferay.portal.model.User.middleName=administrator
6field.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
RE: Prevent user from editing screen name, email address, etc
July 15, 2011 11:50 PM
Answer

George Barelas

Rank: New Member

Posts: 1

Join Date: December 1, 2009

Recent Posts

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.
Udaya Ramakrishnan
RE: Prevent user from editing screen name, email address, etc
October 17, 2011 10:07 PM
Answer

Udaya Ramakrishnan

Rank: Junior Member

Posts: 67

Join Date: September 6, 2011

Recent Posts

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
Sandeep Nair
RE: Prevent user from editing screen name, email address, etc
October 17, 2011 10:33 PM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1692

Join Date: November 5, 2008

Recent Posts

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
Udaya Ramakrishnan
RE: Prevent user from editing screen name, email address, etc
October 18, 2011 3:21 AM
Answer

Udaya Ramakrishnan

Rank: Junior Member

Posts: 67

Join Date: September 6, 2011

Recent Posts

hi sandeep,
Done as u said and it is working now

Thanks
Udaya.R