lib/ddr/auth/roles/role_set.rb in ddr-models-1.13.2 vs lib/ddr/auth/roles/role_set.rb in ddr-models-1.14.0

- old
+ new

@@ -19,11 +19,11 @@ end end # Grants roles - i.e., adds them to the role set # Note that we reject roles that are included because - # ActiveTriples::Term#<< does not support isomorphism. + # ActiveTriples::Term#<< does not support isomorphism. # https://github.com/ActiveTriples/ActiveTriples/issues/42 # @example - default scope ("resource") # grant type: "Curator", agent: "bob" # @example - explicit scope # grant type: "Curator", agent: "sue", scope: "policy" @@ -38,11 +38,11 @@ def granted?(role) include? coerce(role) end # Revokes roles - i.e., removes them from the role set - # Note that we have to destroy resources on the + # Note that we have to destroy resources on the # ActiveTriples::Term because Term#delete does not # support isomorphism. # https://github.com/ActiveTriples/ActiveTriples/issues/42 # @example # revoke type: :curator, agent: "bob", scope: :resource @@ -61,10 +61,10 @@ revoke_all grant(*roles) end # Remove all roles from the role set - def revoke_all + def revoke_all each(&:destroy) self end def to_a