掲示板

How to create programmatically site roles?

thumbnail
9年前 に Mirto Silvio Busico によって更新されました。

How to create programmatically site roles?

Regular Member 投稿: 240 参加年月日: 12/01/18 最新の投稿
Hi all,

I need to create net custom roles (example A, B, C) in some sites of a portal.

I know how to do this from the control panel, but I need that the roles are created when I deploy my protlet project.

All the documentation i found is related on how to assign an already existing role.

How can I do this?

Thanks
thumbnail
9年前 に Olaf Kock によって更新されました。

RE: How to create programmatically site roles?

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
RoleServiceUtil or RoleLocalServiceUtil will be your starting point to explore http://docs.liferay.com/portal/6.2/javadocs/. The old and sadly discontinued sevencogs plugin might have some sample code, but I don't know if it still compiles. It used to be part of older versions of Liferay, and you might find something in James' blog article or one of the links that he has in there
thumbnail
9年前 に Mirto Silvio Busico によって更新されました。

RE: How to create programmatically site roles?

Regular Member 投稿: 240 参加年月日: 12/01/18 最新の投稿
Thanks a lot.
I'll study this material.
Mirto