Sha256: 9c06035fd0fc49aa9996b28502a091912cc4935de882e53deedf9b157713b0bd

Contents?: true

Size: 436 Bytes

Versions: 6

Compression:

Stored size: 436 Bytes

Contents

module Ddr::Auth
  class DynamicGroups

    ALL = [ Groups::PUBLIC,
            Groups::REGISTERED,
            Groups::DUKE_ALL,
            Groups::SUPERUSERS,
            Groups::COLLECTION_CREATORS ] +
          AffiliationGroups::ALL
    ALL.freeze

    # @param auth_context [AuthContext]
    # @return [Array<Group>]
    def self.call(auth_context)
      ALL.select { |group| group.has_member?(auth_context) }
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ddr-models-2.0.0.rc1 lib/ddr/auth/dynamic_groups.rb
ddr-models-2.0.0.pre.5 lib/ddr/auth/dynamic_groups.rb
ddr-models-2.0.0.pre.4 lib/ddr/auth/dynamic_groups.rb
ddr-models-2.0.0.pre.3 lib/ddr/auth/dynamic_groups.rb
ddr-models-2.0.0.pre.2 lib/ddr/auth/dynamic_groups.rb
ddr-models-2.0.0.pre.1 lib/ddr/auth/dynamic_groups.rb