掲示板

Prevent user from editing screen name, email address, etc

15年前 に Ben Starr によって更新されました。

Prevent user from editing screen name, email address, etc

Regular Member 投稿: 103 参加年月日: 07/11/27 最新の投稿
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
14年前 に Lisa Simpson によって更新されました。

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

Liferay Legend 投稿: 2034 参加年月日: 09/03/05 最新の投稿
Why not use CAS or some other central authentication to deal with this?
14年前 に Ben Starr によって更新されました。

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

Regular Member 投稿: 103 参加年月日: 07/11/27 最新の投稿
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
13年前 に James McGovern によって更新されました。

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

Junior Member 投稿: 68 参加年月日: 10/06/13 最新の投稿
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
13年前 に Thomas Berg によって更新されました。

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

Regular Member 投稿: 131 参加年月日: 09/09/07 最新の投稿
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
13年前 に James McGovern によって更新されました。

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

Junior Member 投稿: 68 参加年月日: 10/06/13 最新の投稿
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
13年前 に Thomas Berg によって更新されました。

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

Regular Member 投稿: 131 参加年月日: 09/09/07 最新の投稿
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
13年前 に Alan Robertson によって更新されました。

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

New Member 投稿: 19 参加年月日: 10/11/05 最新の投稿
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
12年前 に Jacob Caniparoli によって更新されました。

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

Junior Member 投稿: 27 参加年月日: 10/06/22 最新の投稿
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?
12年前 に George Barelas によって更新されました。

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

New Member 投稿: 1 参加年月日: 09/12/01 最新の投稿
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
12年前 に Udaya Ramakrishnan によって更新されました。

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

Junior Member 投稿: 67 参加年月日: 11/09/07 最新の投稿
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
12年前 に Sandeep Nair によって更新されました。

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

Liferay Legend 投稿: 1744 参加年月日: 08/11/06 最新の投稿
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
12年前 に Udaya Ramakrishnan によって更新されました。

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

Junior Member 投稿: 67 参加年月日: 11/09/07 最新の投稿
hi sandeep,
Done as u said and it is working now

Thanks
Udaya.R
9年前 に sha sri によって更新されました。

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

New Member 投稿: 1 参加年月日: 14/11/27 最新の投稿
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