Bug 793804 (JBEPP-879) - logged in user's role change doesn't take effect on the UI after a certain amount of "cache" time or user logs out and re-login.
Summary: logged in user's role change doesn't take effect on the UI after a certain am...
Keywords:
Status: VERIFIED
Alias: JBEPP-879
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal
Version: 5.2.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.1.ER02
Assignee: mposolda
QA Contact: vramik
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-11 20:08 UTC by Gary Hu
Modified: 2023-02-27 08:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/organization-configuration.xml</filename> directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.
Clone Of:
Environment:
Last Closed:
Type: Feature Request
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNPORTAL-2211 0 Minor Resolved Declare the MembershipUpdateListener in organization-configuration.xml 2014-01-16 09:38:08 UTC
Red Hat Issue Tracker JBEPP-879 0 Major Closed logged in user's role change doesn't take effect on the UI after a certain amount of "cache" time or user logs out and r... 2014-01-16 09:38:09 UTC

Description Gary Hu 2011-04-11 20:08:17 UTC
Help Desk Ticket Reference: https://na7.salesforce.com/500A0000005hXnl
project_key: JBEPP

if logged in user's role is changed, for example, from a "administrator" to "member", the user can still see the links to which only the "administrator" are supposed to access within a certain "cache" time(about 30 mins).  The workaround for this issue is to invoke the method "clearCaches" of mbean    exoortal="portal",service=cachemanager from jmx-console. 

If the user logs out and re-login the change can be reflected too.

Can we have the new feature to make the change takes effect without logging out or flushing the cache via jmx-console?

Comment 1 Jared MORGAN 2011-11-16 23:34:31 UTC
Release Notes Docs Status: Added: Documented as Known Issue
Release Notes Text: Added: If an authenticated user's role is demoted (for example, from a "administrator" to "member"), the user can still see the links to which only the "administrator" should see for approximately 30 minutes after the role info is changed.  To work around the issue, invoke the method "clearCaches" of mbean exoportal="portal",service=cachemanager from jmx-console. A fix is being investigated.
Primary SME: Added: theute


Comment 4 Thomas Heute 2011-12-15 10:56:10 UTC
Labels: Added: EPP_5_2_1_Candidate


Comment 5 Thomas Heute 2012-01-13 13:24:29 UTC
Labels: Removed: EPP_5_2_1_Candidate 


Comment 6 mposolda 2012-02-28 13:46:59 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
CAUSE: when memberships of some user are changed (For example user root will remove user john from group /platform/users group), then user john won't see updates immediately. He needs to logout and login to see it. Example:
1) Start browser1, Go to http://localhost:8080/portal and login as john. User john is in group /platform/administrators by default, so he can see "Administrators" link in group menu,
2) Start browser2, Go to http://localhost:8080/portal and login as root. Go to OrganizationManagement and remove user john from /platform/administrators
3) Return to browser1 and refresh page. User john can still see "administrators" pages, which is a bug.
4) Logout and login again as john. Now "Administrators" are not longer visible. Bad is that john needs to logout and login, otherwise permissions for pages are not reflected.

FIX: I added new listener "MembershipUpdateListener" into organization-configuration.xml file. This listener will update all memberships of logged user in ConversationRegistry, so that changes are immediately reflected in UI.

RESULT: Changes are immediately reflected in UI. In previous example, user john won't see "Administrators" page in step 3, which is correct.

Comment 8 Jared MORGAN 2012-03-21 01:08:04 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,9 +1 @@
-CAUSE: when memberships of some user are changed (For example user root will remove user john from group /platform/users group), then user john won't see updates immediately. He needs to logout and login to see it. Example:
+It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which is configurable from the organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.-1) Start browser1, Go to http://localhost:8080/portal and login as john. User john is in group /platform/administrators by default, so he can see "Administrators" link in group menu,
-2) Start browser2, Go to http://localhost:8080/portal and login as root. Go to OrganizationManagement and remove user john from /platform/administrators
-3) Return to browser1 and refresh page. User john can still see "administrators" pages, which is a bug.
-4) Logout and login again as john. Now "Administrators" are not longer visible. Bad is that john needs to logout and login, otherwise permissions for pages are not reflected.
-
-FIX: I added new listener "MembershipUpdateListener" into organization-configuration.xml file. This listener will update all memberships of logged user in ConversationRegistry, so that changes are immediately reflected in UI.
-
-RESULT: Changes are immediately reflected in UI. In previous example, user john won't see "Administrators" page in step 3, which is correct.

Comment 10 mposolda 2012-03-21 10:25:23 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which is configurable from the organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.+It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.

Comment 12 mposolda 2012-03-21 10:27:16 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.+It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to EPP_HOME/server/<PROFILE>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.

Comment 14 Jared MORGAN 2012-03-23 01:28:58 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to EPP_HOME/server/<PROFILE>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.+It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to <replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.

Comment 15 Jared MORGAN 2012-03-27 21:25:03 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to <replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/organization-configuration.xml directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.+It was discovered that changing memberships of already authenticated users did not immediately take effect. If a user had administrative membership revoked, and remained logged onto the portal, the privileges were still accessible for up to 30 minutes until the user permissions cache was refreshed. This could permit the user to perform undesirable actions in the portal. The fix introduces a new listener "MembershipUpdateListener" which has been added to <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable>PROFILE</replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/organization/organization-configuration.xml</filename> directive file. The listener immediately updates authenticated user memberships based on information in the ConversationRegistry. Changes to user memberships now take effect immediately, which corrects the originally reported issue.

Comment 16 vramik 2012-04-11 08:39:54 UTC
verified:

I tried these 3 steps in EPP5.2.0.GA

1) Start browser1, Go to http://localhost:8080/portal and login as john. User
john is in group /platform/administrators by default, so he can see
"Administrators" link in group menu,
2) Start browser2, Go to http://localhost:8080/portal and login as root. Go to
OrganizationManagement and remove user john from /platform/administrators
3) Return to browser1 and refresh page. 

and user john is still able to see "administrators" pages.

I tried the steps in EPP5.2.0.ER03 and john is not able to see "administrators" pages immediately (no need to log out and log in).


Note You need to log in before you can comment on or make changes to this bug.