app/services/c100_app/permission/application_rules.rb
def permission_needed?
        return false if consent_order?
        return true  if children_with_sgo?

        relationships_require_permission?
      end
# From most common to less common, to avoid running unnecessary code/rules.
#
#   1. Consent order applications are exempt from permission.
#
#   2. If any of the children in the application has a SGO in force,
#      permission is required, no need to check anything else.
#
#   3. Finally, we need to check each applicant-child relationship and the
#      orders they are applying for to decide if permission will be needed.
#
From most common to less common, to avoid running unnecessary code/rules.
1. Consent order applications are exempt from permission.

2. If any of the children in the application has a SGO in force,
permission is required, no need to check anything else.

3. Finally, we need to check each applicant-child relationship and the
orders they are applying for to decide if permission will be needed.
From most common to less common to avoid running unnecessary code / rules . 1 . Consent order applications are exempt from permission . 2 . If any of the children in the application has a SGO in force permission is required no need to check anything else . 3 . Finally we need to check each applicant - child relationship and the orders they are applying for to decide if permission will be needed .
def permission_needed?
        return false if consent_order?
        return true  if children_with_sgo?
        relationships_require_permission?
      end
def permission_needed? return false if consent_order? return true if children_with_sgo? relationships_require_permission? end
From most common to less common, to avoid running unnecessary code/rules.
From most common to less common to avoid running unnecessary code / rules .