diff options
Diffstat (limited to 'app/serializers/fork_namespace_entity.rb')
-rw-r--r-- | app/serializers/fork_namespace_entity.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/fork_namespace_entity.rb b/app/serializers/fork_namespace_entity.rb index 5fb083e29b0..2be37d23a05 100644 --- a/app/serializers/fork_namespace_entity.rb +++ b/app/serializers/fork_namespace_entity.rb @@ -31,7 +31,11 @@ class ForkNamespaceEntity < Grape::Entity end expose :can_create_project do |namespace, options| - options[:current_user].can?(:create_projects, namespace) + if Feature.enabled?(:fork_project_form, options[:project], default_enabled: :yaml) + true + else + options[:current_user].can?(:create_projects, namespace) + end end private |