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-core-1.17.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.16.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.15.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.14.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.13.2 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.13.1 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.13.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.12.2 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.12.1 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.12.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.11.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.10.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.9.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.8.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.7.0 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.6.6 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.6.5 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.6.4 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.6.3 lib/ddr/auth/affiliation_groups.rb
ddr-core-1.6.2 lib/ddr/auth/affiliation_groups.rb