Workshop auth fixes and better error reporting

This commit is contained in:
Godwin
2017-07-19 20:29:25 -07:00
parent c21cc05c99
commit e8ca73a801
20 changed files with 371 additions and 332 deletions
+40 -50
View File
@@ -1,53 +1,43 @@
%p=@message.html_safe if @message.present?
%pre=@report
%h1=@title
- if @exception.present?
%h1 Backtrace
%pre=@exception
%h2 Error details
%code.signature{class: "#{@report.source}-signature"}
= "#{@report.signature}"
%code.backtrace{class: "#{@report.source}-backtrace"}=@report.backtrace
%h1 Details
%table.error-report
%tr
%th Key
%th Value
%tr
%td User ID
%td=@user.present? ? @user.id : ''
%tr
%td User Name
%td=@user.present? ? @user.name : ''
%tr
%td User Email
%td=@user.present? ? @user.email : ''
%tr
%td IP Address
%td=@request['remote_ip']
%tr
%td UUID
%td=@request['uuid']
%tr
%td URL
%td=@request['original_url']
%tr
%td Time
%td=@time
%h1 Params
%table.error-report
%tr
%th Key
%th Value
- @params.each do | key, value |
%h2 Request details
.request-details
%table
%tr
%td=key
%td=value
%h1 Request Environment
%table.error-report
%tr
%th Key
%th Value
- @request['env'].each do | key, value |
%tr
%td=key
%td=value
%th Response code
%td=@request.response
- @request.data.each do |key, value|
- if key.to_s == 'user'
- if @user
%tr
%th User ID
%td=@user.id
%tr
%th User Email
%td=@user.email
%tr
%th User Name
%td=@user.firstname
- else
%tr
%th User ID
%td NULL
%tr.spacer
%td{ colspan: 2 }
- else
%tr
%th=key.to_s.titlecase
%td
- if value.is_a?(Hash)
%table
- value.each do |k, v|
%tr
%th=k
%td=v
- else
= value.to_s
+1 -2
View File
@@ -1,11 +1,10 @@
= render 'conferences/page_header', page_key: 'Facilitate_Workshop'
%article
= row do
= form_tag facilitate_workshop_request_path(@this_conference.slug, @workshop.id), class: 'composition' do
= form_tag facilitate_workshop_request_path(@this_conference.slug, @workshop.id), class: :composition do
= (hidden_field_tag :workshop_id, @workshop.id) if @workshop
= columns(medium: 12) do
%h2=_'articles.workshops.headings.facilitate', "Request to Facilitate #{@workshop.title}", vars: { workshop_title: @workshop.title }
= registration_step_menu
=_('articles.workshops.paragraphs.facilitate_request','Please tell the current workshop facilitators who you are, why you want to help facilitate the workshop, and how you think you will help make the workshop better. All of the current facilitators will be emailed and they may ask more questions before approving or denying your request. Please note that this will reveal your email address to the facilitators.')
.text-area-field.input-field
= label_tag :message
@@ -3,10 +3,9 @@
%article
= row do
%h2=_'page_titles.conferences.Facilitate_Workshop'
= registration_step_menu
= columns(medium: 12) do
=_('articles.workshops.paragraphs.facilitate_request_sent','Your request has been sent. You will receive an email once your request is approved or denied or if the current facilitators have any questions.')
= columns(medium: 12) do
.actions
= link_to (_'actions.workshops.View'), view_workshop_path(@this_conference.slug, @workshop.id), :class => 'button'
= link_to (_'actions.workshops.View_All'), register_step_path(@this_conference.slug, :wokshops), :class => 'button'
= link_to (_'actions.workshops.View'), view_workshop_path(@this_conference.slug, @workshop.id), class: :button
= link_to (_'actions.workshops.View_All'), register_step_path(@this_conference.slug, :wokshops), class: :button
+2 -2
View File
@@ -11,5 +11,5 @@
= row do
= columns(medium: 12) do
.actions.center
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), :class => [:button, :modify]) if @workshop.can_edit?(current_user)
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), :class => 'button delete') if @workshop.can_delete?(current_user)
= (link_to (_'actions.workshops.Edit'), edit_workshop_path(@this_conference.slug, @workshop.id), class: [:button, :modify]) if @workshop.can_edit?(current_user)
= (link_to (_'actions.workshops.Delete'), delete_workshop_path(@this_conference.slug, @workshop.id), class: 'button delete') if @workshop.can_delete?(current_user)