[refs #90] clean ability
This commit is contained in:
parent
b3fd95d7fa
commit
f699add7b4
|
@ -121,7 +121,7 @@ class Ability
|
||||||
can :read, Issue, :project => {:owner_type => 'Group', :owner_id => user.group_ids}
|
can :read, Issue, :project => {:owner_type => 'Group', :owner_id => user.group_ids}
|
||||||
can(:read, Issue, read_relations_for('issues', 'projects')) {|issue| can? :read, issue.project rescue nil}
|
can(:read, Issue, read_relations_for('issues', 'projects')) {|issue| can? :read, issue.project rescue nil}
|
||||||
can(:create, Issue) {|issue| can? :read, issue.project}
|
can(:create, Issue) {|issue| can? :read, issue.project}
|
||||||
can([:update, :destroy], Issue) {|issue| issue.user_id == user.id or local_admin?(issue.project)}
|
can(:update, Issue) {|issue| issue.user_id == user.id or local_admin?(issue.project)}
|
||||||
cannot :manage, Issue, :project => {:has_issues => false} # switch off issues
|
cannot :manage, Issue, :project => {:has_issues => false} # switch off issues
|
||||||
|
|
||||||
can :read, PullRequest, :base_project => {:owner_type => 'User', :owner_id => user.id}
|
can :read, PullRequest, :base_project => {:owner_type => 'User', :owner_id => user.id}
|
||||||
|
|
Loading…
Reference in New Issue