Add user to team he creates

This commit is contained in:
Dmitriy Zaporozhets 2013-02-18 14:35:38 +02:00
parent 020078663e
commit 01a7250ba5
4 changed files with 22 additions and 6 deletions

View file

@ -123,7 +123,7 @@ class Ability
def user_team_abilities user, team
rules = []
# Only group owner and administrators can manage group
# Only group owner and administrators can manage team
if team.owner == user || team.admin?(user) || user.admin?
rules << [ :manage_user_team ]
end