[refs #168] can read repos in the open platform

This commit is contained in:
Alexander Machehin 2012-02-07 19:55:45 +06:00
parent 325667dde0
commit c47db56270
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ class Ability
can :autocomplete_user_uname, Platform
# TODO delegate to platform?
can :read, Repository, :platform => {:visibility => 'open'}
can :read, Repository, :owner_type => 'User', :owner_id => user.id
can :read, Repository, :owner_type => 'Group', :owner_id => user.group_ids
can(:read, Repository, read_relations_for('repositories')) {|repository| local_reader? repository}