Foros de discusión

RE: UserLocalServiceUtil.addUser - Power User role

thumbnail
Samuel Kong, modificado hace 7 años.

RE: UserLocalServiceUtil.addUser - Power User role (Respuesta)

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
1. Control Panel > Configuration > Portal Settings > Users > Default User Associations
2. Remove "Power User" from "Roles"
thumbnail
darren rose, modificado hace 7 años.

RE: UserLocalServiceUtil.addUser - Power User role

Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Samuel Kong:
1. Control Panel > Configuration > Portal Settings > Users > Default User Associations
2. Remove "Power User" from "Roles"


Is it possible to override the default roles using the serviceContext? the last parameter to addUser()
thumbnail
Samuel Kong, modificado hace 7 años.

RE: UserLocalServiceUtil.addUser - Power User role

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
No
thumbnail
darren rose, modificado hace 7 años.

RE: UserLocalServiceUtil.addUser - Power User role

Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Samuel Kong:
No


Ok, is it possible to programatically change the default roles added when a user is created? Like it is possible to change the defaultPasswordPolicy?
thumbnail
Samuel Kong, modificado hace 7 años.

RE: UserLocalServiceUtil.addUser - Power User role

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
darren rose:
Ok, is it possible to programatically change the default roles added when a user is created?

No. But you can specify the roles the user will have when you create the user. Look for the roleId argument in the addUser method.

Like it is possible to change the defaultPasswordPolicy?

You can change the default password policy. But this isn't related to user roles.
thumbnail
darren rose, modificado hace 7 años.

RE: UserLocalServiceUtil.addUser - Power User role

Regular Member Mensajes: 215 Fecha de incorporación: 4/04/15 Mensajes recientes
Samuel Kong:
darren rose:
Ok, is it possible to programatically change the default roles added when a user is created?

No. But you can specify the roles the user will have when you create the user. Look for the roleId argument in the addUser method.

Like it is possible to change the defaultPasswordPolicy?

You can change the default password policy. But this isn't related to user roles.


Yes, I am setting the roleIds for User only, but Power User is also added, it would be useful, if only the roleIds listed were added - and not the requriement to update the config using the admin control panel