diff --git a/Gemfile.lock b/Gemfile.lock index 8067a42..51506da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -265,12 +265,6 @@ rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (11.3.0) - ransack (1.8.2) - actionpack (>= 3.0) - activerecord (>= 3.0) - activesupport (>= 3.0) - i18n - polyamorous (~> 1.3) recaptcha (4.1.0) json redcarpet (3.3.4) @@ -407,4 +401,4 @@ ruby 2.2.2p95 BUNDLED WITH - 1.13.7 + 1.14.6 diff --git a/app/controllers/phases_controller.rb b/app/controllers/phases_controller.rb index 2d60125..afe9711 100644 --- a/app/controllers/phases_controller.rb +++ b/app/controllers/phases_controller.rb @@ -102,7 +102,9 @@ @phase = Phase.eager_load(:sections).find_by('phases.id = ?', params[:id]) authorize @phase - @edit = params[:edit] == "true" ? true : false + @edit = (@phase.template.org == current_user.org) + #@edit = params[:edit] == "true" ? true : false + #verify if there are any sections if not create one @sections = @phase.sections if !@sections.any?() || @sections.count == 0