app/models/hydra/access_controls/permission.rb in hydra-access-controls-10.3.3 vs app/models/hydra/access_controls/permission.rb in hydra-access-controls-10.3.4

- old
+ new

@@ -3,12 +3,16 @@ GROUP_AGENT_URL_PREFIX = 'http://projecthydra.org/ns/auth/group'.freeze PERSON_AGENT_URL_PREFIX = 'http://projecthydra.org/ns/auth/person'.freeze class Permission < AccessControlList has_many :admin_policies, inverse_of: :default_permissions, class_name: 'Hydra::AdminPolicy' + # @param [Hash] args + # @option args [#to_s] :name name of agent + # @option args [#to_s] :type type of agent: group/person + # @option args [String] :access description of access: read/edit/discover def initialize(args) super() - build_agent(args[:name], args[:type].to_s) + build_agent(args[:name].to_s, args[:type].to_s) build_access(args[:access]) end def to_hash { name: agent_name, type: type, access: access }