掲示板

Inherit role through group

7年前 に Julian Pfeil によって更新されました。

Inherit role through group

Junior Member 投稿: 72 参加年月日: 16/03/01 最新の投稿
Liferay 7 GA3

Problem
I have a user in a group. This group got assigned the Administrator role. The inherited administrator role shows up in the user's profile page. But when the user logs in he does not have the administrator rights or view.

What i did
I went to Control Panel → Users → Roles, clicked on the Administrator role, pressed the Add Assignee(s) button and selected a group (let's call it Group A) which has one user (User X). The group shows up under groups on Administrator's assignees page.

What went wrong/what did i do wrong?

Kind Regards,
Julian

添付ファイル:

7年前 に Julian Pfeil によって更新されました。

RE: Inherit role through group

Junior Member 投稿: 72 参加年月日: 16/03/01 最新の投稿
It is reproducable:
  • Create a User Group
  • Make the new user group assignee of the "Administrator" role
  • Create a new user -> Log in -> You see the basic user view
  • Add the new user to the test group
  • Log in again with the user -> Still no Admin view (Even though the "Administrator" role shows up as inherited role via the group)


Is this a bug? Any comments would be nice...
7年前 に Markus Keinz によって更新されました。

RE: Inherit role through group

New Member 投稿: 3 参加年月日: 16/09/02 最新の投稿
Hi Julian,

I have a similar problem with user group inheritance and role assignments. I like to set page permissions via roles and containing user groups, but the user groups seem not to be resolved correctly in permission handling of Liferay.

There is also an unresolved ticket in Jira describing this issue: https://issues.liferay.com/browse/LPS-69121

I don't understand why the ticket is closed, as this issue seems to affect a core functionality of the Liferay permission structure?!?!

The only workaround I found out so far, is to assign the user(s) directly to the role and not via user group. Unfortunately we have to handle large groups of users, so this is not a really practical solution for us.

Does anyone have an idea how to solve this problem?

Thanks and best regards,
Markus
7年前 に Alexandru Georgescu によって更新されました。

RE: Inherit role through group

New Member 投稿: 5 参加年月日: 12/09/05 最新の投稿
The issue seems to be fixed on the master branch. Although the fix is more complex, the main issue is in the UserBagFactoryImpl class in the create method where it doesn't consider the UserGroups of the current user, just the Organizations. So, a quick fix, a hack actually, would be the following:

1) See attachment:
Add the following lines on in the UserBagFactoryImpl.java file from the 7.0.2 ga3 tag:
So from line 63 to 66.

2) Complile this class

3) Replace it in your portal-impl.jar and restart Liferay.

As I said, it's a hack, but it works in case this is critical for you (as it was for me) and you cannot afford to wait for the next release.
I guess the elegant solution would be to create an Ext Plugin, but that's not supported anymore, as far as I know.

How this helps,
Regards