Foros de discusión
How to add custom role types (sub-types) in Liferay
Scott P, modificado hace 14 años.
How to add custom role types (sub-types) in Liferay
Junior Member Mensajes: 36 Fecha de incorporación: 8/01/10 Mensajes recientes
For anyone who may be wondering how to create custom role types (sub-types to be exact). This may be used to search for role types if you have a large number of roles.
Here are the steps:
1) add the following to portal-ext.properties:
2) Restart the app server
3) add a new role (make sure it's type is set to the parent of the sub-type you are wanting to add later. In the example above you would use "regular role" to access "subtype1" later.
4) save the role
5) reopen the role (Actions>Edit)
6) now you will see the subtype menu and you can select subtype1,subtype2 or subtype3
Suggestions: Would be great if we didn't have to save the role first to be able to view the sub-type.
Here are the steps:
1) add the following to portal-ext.properties:
# Specify subtypes of roles if you want to be able to search for roles
# using your custom criteria.
#
roles.community.subtypes=
roles.organization.subtypes=
roles.regular.subtypes=subtype1,subtype2,subtype3
2) Restart the app server
3) add a new role (make sure it's type is set to the parent of the sub-type you are wanting to add later. In the example above you would use "regular role" to access "subtype1" later.
4) save the role
5) reopen the role (Actions>Edit)
6) now you will see the subtype menu and you can select subtype1,subtype2 or subtype3
Suggestions: Would be great if we didn't have to save the role first to be able to view the sub-type.