Module: Ddr::Auth::Groups
- Defined in:
- lib/ddr/auth/groups.rb
Constant Summary collapse
- PUBLIC =
Group.new "public", label: "Public" do |auth_context| true end
- REGISTERED =
Group.new "registered", label: "Registered Users" do |auth_context| auth_context.authenticated? end
- DUKE_ALL =
Group.new "duke.all", label: "Duke NetIDs" do |auth_context| auth_context.duke_agent? end
Class Method Summary collapse
-
.all ⇒ Array<Group>
Return the list of all groups available for use in the repository, i.e., that can be used to assert access controls.
- .call(auth_context) ⇒ Array<Group>
Class Method Details
.all ⇒ Array<Group>
Return the list of all groups available for use in the repository,
i.e., that can be used to assert access controls.
20 21 22 |
# File 'lib/ddr/auth/groups.rb', line 20 def self.all DynamicGroups::ALL + Ddr::Auth.grouper_gateway.repository_groups end |
.call(auth_context) ⇒ Array<Group>
26 27 28 |
# File 'lib/ddr/auth/groups.rb', line 26 def self.call(auth_context) DynamicGroups.call(auth_context) + RemoteGroups.call(auth_context) end |