Sha256: 53063e34cecbcceed96180e7c41b93e71fd3096f5ced5c5229d4f65e3a3f942b

Contents?: true

Size: 273 Bytes

Versions: 5

Compression:

Stored size: 273 Bytes

Contents

class Group < Record
  def match_user_on_record?(user, record)
    return false if user.nil?
    user.values['groups'].include? id
  end
  
  def permitted?(user, record)
    match_user_on_record?(user, record) || parent.try(:match_user_on_record?, user, record)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/security/group.rb
yodel-0.0.4 lib/yodel/models/security/group.rb
yodel-0.0.3 lib/yodel/models/security/group.rb
yodel-0.0.2 lib/yodel/models/security/group.rb
yodel-0.0.1 lib/yodel/models/security/group.rb