Project

General

Profile

Bug #15427

03-roles.rb seeds katello view_* filters for Viewer role multiple times

Added by Partha Aji almost 3 years ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Roles and Permissions
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1346296
Description of problem:
03-roles.rb seeds katello view_* filters for Viewer role multiple times
On a fresh/upgraded Satellite Viewer role has following filters listed 5 times:
- view_activation_keys
- view_content_hosts
- view_content_views
- view_gpg_keys
- view_host_collections
- view_lifecycle_environments
- view_products
- view_subscriptions
- view_sync_plans

It seems that it was introduced by fix of BZ 1341656

Version-Release number of selected component (if applicable):

How reproducible:
always

Steps to Reproduce:
1. Navigate to Administer -> Roles -> Viewer -> tab Filters
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none

some filters listed 5 times

2. # foreman-rake db:seed
...
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
...
All seed files executed

3.Navigate to Administer -> Roles -> Viewer -> tab Filters
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none
Activation Keys view_activation_keys none

some filters listed 6 times

Actual results:
multliplicity of filters

Expected results:
no duplicity

Associated revisions

Revision 7c71d45d (diff)
Added by David Davis almost 3 years ago

Fixes #15427 - Remove old permission seed file (#6132)

I think this file predates the permission stuff. It's basically
recreating permissions that should get added via our permission code.

Also, creating a migration for users that have duplicate filters already
in their database.

History

#1 Updated by The Foreman Bot almost 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3593 added

#2 Updated by David Davis almost 3 years ago

  • Project changed from Katello to Foreman

#3 Updated by Marek Hulán almost 3 years ago

  • Category set to Plugins-Engines

#4 Updated by The Foreman Bot almost 3 years ago

  • Pull request https://github.com/Katello/katello/pull/6132 added

#5 Updated by David Davis almost 3 years ago

  • Project changed from Foreman to Katello
  • Category deleted (Plugins-Engines)

#6 Updated by Justin Sherrill almost 3 years ago

  • Category set to Roles and Permissions
  • Legacy Backlogs Release (now unused) set to 162
  • Difficulty set to easy

#7 Updated by Anonymous almost 3 years ago

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

Also available in: Atom PDF