CLOSER-Cohorts/archivist

View on GitHub
app/policies/user_group_policy.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class UserGroupPolicy < ApplicationPolicy
  class Scope < Scope
    def resolve
      if user.group.study == '*'
        scope.all
      else
        scope.where(id: user.group)
      end
    end
  end
end