You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overriding existing ability logic entries silently removes important permissions behavior in the application. This unexpected behavior can occur for reasons as simple as including this module in the "wrong" order.
the easiest way to realistically reproduce is to do something like
classAbilityincludeBlacklight::AccessControls::Abilityself.ability_logic=[:my_custom_ability_hook]# more logic here# ...# and so onincludeHydra::Abilityend
The text was updated successfully, but these errors were encountered:
Descriptive summary
When
Hydra::Ability
is included in a class, it overrides all existingability_logic
entries (at https://github.com/samvera/hydra-head/blob/master/hydra-access-controls/lib/hydra/ability.rb#L16). avoid this.Rationale
Overriding existing ability logic entries silently removes important permissions behavior in the application. This unexpected behavior can occur for reasons as simple as including this module in the "wrong" order.
Expected behavior
Actual behavior
Ability.ability_logic.include?(:my_custom_ability_hook) # => false
Steps to reproduce the behavior
the easiest way to realistically reproduce is to do something like
The text was updated successfully, but these errors were encountered: