Project

General

Profile

Refactor #34006

Feature #29991: Enable Zeitwerk autoload mode for Rails 6+

Refactor #33886: Fix early loads of constants

Plugin and its rbac_support are using Role and Permission models too early

Added by Ondřej Ezr about 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Initialization is not done at that point, we should postpone the Role and Permission creation and just remember what the plugin wants to do in a registry prior that.


Subtasks

Refactor #34009: Add plugin after_initialize hookClosedOndřej Ezr
Refactor #34010: Add initialization method to RbacRegistryClosedOndřej Ezr
Refactor #34011: Move add_permissions_to_default_roles to rbac_registryRejected
Refactor #34012: Move add_all_permissions_to_default_roles to RbacRegistryRejected
Refactor #34013: Move add_resource_permissions_to_default_roles to RbacRegistryRejected
Refactor #34014: Move role creation into RbacRegistryRejected
Refactor #34015: Move permission creation in DB to RbacRegistryRejected

Associated revisions

Revision aa8657bc (diff)
Added by Ondřej Ezr 11 months ago

Fixes #34006 - use rbac_registry for all plugin rbac

Before this change we have executed all the changes to the Roles and Permissions right away in the plugins.
This pushes all the changes into the rbac_registry and uses it to initialize the changes only after Rails are ready.

Revision f251bd40 (diff)
Added by Ondřej Ezr 11 months ago

Refs #34006 - enable setup in tests

History

#1 Updated by The Foreman Bot about 1 year ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8954 added

#2 Updated by The Foreman Bot 11 months ago

  • Fixed in Releases 3.2.0 added

#3 Updated by Ondřej Ezr 11 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF