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:
authorStan Hu <stanhu@gmail.com>2015-06-20 07:18:24 +0300
committerStan Hu <stanhu@gmail.com>2015-06-20 07:23:46 +0300
commite785b9d2e24ca7e16e8ff3fa46f2e2b82478be9b (patch)
tree06f762b77dee4c8a05fecd4dd42d0b1dfefee5e5 /app/models/ability.rb
parent74a6732c0dfc1416cad382203544d9c4d6246f58 (diff)
Fix Error 500 when one user attempts to access a personal, internal snippet
Closes #1815
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 bcd2adee00b..a5db22040e0 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -263,7 +263,7 @@ class Ability
:"modify_#{name}",
]
else
- if subject.respond_to?(:project)
+ if subject.respond_to?(:project) && subject.project
project_abilities(user, subject.project)
else
[]