Bug #6065

Inverting the admin flag has no effect on menu cache

Added by Greg Sutcliffe over 3 years ago. Updated about 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Greg Sutcliffe
Category:Web Interface
Target version:Sprint 26
Difficulty:easy Bugzilla link:1105251
Found in release:1.5.0 Pull request:https://github.com/theforeman/foreman/pull/1495
Story points-
Velocity based estimate-
Release1.5.2Release relationshipAuto

Description

The TopbarSweeper cache clearing system only ever acts on User.current. This means if an admin toggles the admin flag on another user/group, that user's topbar does not refresh and show updated entries until the cache naturally times out (or is cleared with =foreman-rake tmp:cache:clear=).

Steps to reproduce:
1. Create a user without admin flag or roles
2. In a separate browser sesson, log in with that user.
=> observe they can only see Hosts and Bookmarks
3. Create a user group, give it the admin flag, and assign the above user to it
4. Refresh the user's page

Expected results:
The user can now see all menu entries on the topbar

Actual result:
The user still only sees Hosts and Bookmarks


Related issues

Related to Foreman - Bug #6831: When creating a new organization as an admin, the switche... Closed 07/30/2014
Related to Foreman - Bug #6873: Error during db:seed from 1.4 to 1.6: undefined method `e... Closed 08/01/2014

Associated revisions

Revision 70acceb5
Added by Greg Sutcliffe about 3 years ago

Fixes #6065 - Update TopbarSweeper to clear cache for other users than User.current

History

#1 Updated by Greg Sutcliffe over 3 years ago

  • Status changed from New to Assigned
  • Assigned To set to Greg Sutcliffe
  • Target version set to Sprint 24
  • Difficulty set to easy

#2 Updated by Greg Sutcliffe over 3 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by marcelo veglienzone over 3 years ago

I can confirm the patch works as expected.

#4 Updated by Daniel Lobato Garcia over 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1105251

#5 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 24 to Sprint 25

#6 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.5.2

#7 Updated by Dmitri Dolguikh about 3 years ago

  • Target version changed from Sprint 25 to Sprint 26

#8 Updated by The Foreman Bot about 3 years ago

  • Pull request https://github.com/theforeman/foreman/pull/1495 added

#9 Updated by Greg Sutcliffe about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#10 Updated by Dominic Cleal about 3 years ago

  • Related to Bug #6831: When creating a new organization as an admin, the switcher doesn't list it added

#11 Updated by Dominic Cleal about 3 years ago

  • Related to Bug #6873: Error during db:seed from 1.4 to 1.6: undefined method `expire_topbar_cache' for nil:NilClass added

Also available in: Atom PDF