Fixes #19873 - Fix Style/MultilineIfModifier cop (#5705)
Fixes #22331 - Fix Rails/Presence cop
Fixes #19895 - Fix Style/RedundantReturn cop
Fixes #22918 - Audit all taxonomies assignments
We need to move all audited definitions to top of models because allconcerns can use audit_associations call which relies on audit beingalready activated.
Fixes #19907 - Configure Style/TernaryParentheses cop
Fixes #20470 - Audit role filter changes
Fixes #20274 - Filter fixtures have many resource_types
Filters cannot have many resource_types - each filter needs to have itsown resource type, e.g: one filter does not accommodate permissions for"Host" and "DiscoveredHost".
This is enforced by a validator in the model, but our fixtures are able...
Fixes #20258 - better unique permission types error
Fixes #13772 - orchestration now uses app logger
fixes #19035 - rewrite TopbarSweeper without rails-observers
Moves from the observer object into two mixins, one on the model and oneon the top-level controllers to observe creates/updates/destroys onmonitored models. Replaces rails-observers as it lacks Rails 5 support.
Fixes #18001 - Add plugin permissions to core's roles
Fixes #12547 - Added validators to interger fields
With this commit, instead of postgresql exception it willshow proper validation message for interger fields.
fixes #17574, #17364 - update scoped_search to 4.x
scoped_search's sort() now accepts a replacement for params which isfiltered in an overridden Foreman sort helper, permitting additionalparameters used in Foreman's index pages.
Replaces :in and :alias in search definitions with preferred keywords.
fixes #16527 - replace where_values calls on relations
Fixes #7806 - allow taxonomy association on role level
fixes #3917 - replace protected_attrs with strong parameters
Filtering of attributes has moved from the protected_attributes gem tostrong parameters in controller concerns, to be in line with currentRails recommendations.
Concerns are shared between UI and both API controllers and list the...
Fixes #14546 - ability to restrict *_external_variablesFixes #14535 - corrects permissions for smart class parameters
Fixes #14184 - allow filter creation for users with taxonomies
Fixes #12676 - Filter contains two attr_accessible declarations
The 2nd one was just the leftovers of the old declaration.Organization/location attr_accessible are loaded via Taxonomies, and:unlimited was missing from the first declaration so I moved it there.
Fixes #7568 - Use attr_accessible for Rails 4 upgrade
Refs #10409 - Rails 4 compatible changes with Rails 3
This includes some changes that can be applied to Rails 3 withoutany issue and don't follow any particular pattern/deprecation, Ingeneral these are minor things we have to change. Other PRs withretrocompatible changes that aim to fix particular deprecations...
Refs #3809 - Stabby lambda syntax for oneliners
I started by spotting log.rb which didn't have a lambda wrapping itsdefault scope, as needed by Rails 4. Since the style guide and mostRails 4 documents used the stabby lambda, I turned on the cop so that we...
Fixes #10803: Return nil if no resource_type when creating a filter.
In some instances, such as during DB seed, when a filter is beingcreated for the first time the before_validation callback tobuild_taxonomy_search is triggered. Since, the filter hasn't been...
Fixes #10713 - improved backtrace logging
fixes #6332 - skip taxonomy queries when features are disabled
Fixes #7615 - filter ignore current context
Fixes #7523 - Removed autocomplete search from id fields
Refs #3809 - Remove useless assignments
Fixes #5541 - disallow taxonomy assignment
If a filter resource does not support taxonomy assignment, we don'tallow to assign them to filter.
Fixes #7418 - fixed capitalization for some AR errors
fixes #6636, #6657, #6694 - add field length validations, extend audit field length
Fixes #6065 - Update TopbarSweeper to clear cache for other users than User.current
fixes #5235: it's impossible to create filters with invaid searches
fixes #5777 - search on filters returns error
Fixes #5664 - Host filters can use taxonomies
Also disables taxonomy filters on resources that do not support them.
Fixes #4370 - Filters list show permissions
fixes #812 - new permissions model, user group role and nest support, role filters for better granularity