fiedl/your_platform

View on GitHub
app/models/abilities/attachment_ability.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Consider simplifying this complex logical expression.
Open

    if not read_only_mode?
      can :update, Attachment do |attachment|
        parent_ability_can?(:read, attachment) &&
        (attachment.parent.respond_to?(:group) && attachment.parent.group) && (attachment.parent.group.officers_of_self_and_ancestors.include?(user)) &&
        ((attachment.author == user) || (attachment.parent.respond_to?(:author) && attachment.parent.author == user))
Severity: Critical
Found in app/models/abilities/attachment_ability.rb - About 3 hrs to fix

    There are no issues that match your filters.

    Category
    Status