diff options
author | babatakao <babatakao@gmail.com> | 2013-06-05 09:34:13 +0400 |
---|---|---|
committer | babatakao <babatakao@gmail.com> | 2013-06-05 10:41:33 +0400 |
commit | 86a262de1af7f34629276f584a7af45fcd08b871 (patch) | |
tree | 17997249a8669f6823bfbb41337aae0491e12310 /app/models/ability.rb | |
parent | b9d989dc056a2a2b9316ff9aa06b57c736426871 (diff) |
Authorize all teams to admin: fix 500 error on showing team page.
500 error was occured in the following steps:
1. user1 creates new team "team1".
2. Assign team1 to project1.
3. Sign in as admin. This admin is not a member of team1.
4. Open project1 team setting page (/project1/team).
5. Click "team1" link in "Assigned teams" area.
6. 500 error.
Fixed this issue.
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index 3e781839d57..1a55e3c7688 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -125,7 +125,7 @@ class Ability rules = [] # Only group owner and administrators can manage team - if team.owner == user || team.admin?(user) || user.admin? + if user.admin? || team.owner == user || team.admin?(user) rules << [ :manage_user_team ] end |