Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbabatakao <babatakao@gmail.com>2013-06-05 09:34:13 +0400
committerbabatakao <babatakao@gmail.com>2013-06-05 10:41:33 +0400
commit86a262de1af7f34629276f584a7af45fcd08b871 (patch)
tree17997249a8669f6823bfbb41337aae0491e12310 /app/models/ability.rb
parentb9d989dc056a2a2b9316ff9aa06b57c736426871 (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.rb2
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