Sha256: 7e59de297056fa01de5ab727ef211e420b44261ac4f88bf67690f740a47f1f4e

Contents?: true

Size: 422 Bytes

Versions: 160

Compression:

Stored size: 422 Bytes

Contents

module Ddr::Auth
  class AffiliationGroups

    all = []

    Affiliation::ALL.each do |affiliation|
      group = Group.new "duke.#{affiliation}",
                        label: "Duke #{affiliation.capitalize}" do |auth_context|
        auth_context.affiliation.include? affiliation
      end

      const_set affiliation.upcase, group

      all << const_get(affiliation.upcase)
    end

    ALL = all.freeze

  end
end

Version data entries

160 entries across 160 versions & 2 rubygems

Version Path
ddr-models-2.7.1 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.7.0 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.7.0.rc1 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.2 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.1 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.0 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.0.rc4 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.0.rc3 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.0.rc2 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.6.0.rc1 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.5.3 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.5.2 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.5.1 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.5.0 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.5.0.rc1 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.4.16 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.4.15 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.4.14 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.4.13 lib/ddr/auth/affiliation_groups.rb
ddr-models-2.4.12 lib/ddr/auth/affiliation_groups.rb