Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

304 - Tackles the webkit-issue by adding another POST-based route for logout #365

Merged
merged 3 commits into from
Feb 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/application/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<%= link_to('Profile', user_path(current_user), class: "dropdown-item") %>
<%= link_to('Logout', destroy_user_session_path, method: :delete, class: "text-danger dropdown-item") %>
<%= link_to('Logout', new_sign_out_path, method: :post, class: "text-danger dropdown-item") %>
</div>
</li>
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
get 'slack/new' => 'slack#new', as: :new_slack
get 'slack/auth' => 'slack#update', as: :update_slack

devise_scope :user do # temporary fix related to GitHub issue 304
post '/users/new_sign_out' => 'devise/sessions#destroy', as: :new_sign_out
end
devise_for :users,
path: 'users',
controllers: {
Expand Down
10 changes: 4 additions & 6 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
t.datetime "updated_at", null: false
t.integer "port"
t.string "application_name"
t.integer "user_id"
t.text "description"
t.integer "user_id"
t.index ["user_id"], name: "index_requests_on_user_id"
end

Expand Down Expand Up @@ -129,11 +129,11 @@
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.integer "role"
t.string "first_name"
t.string "last_name"
t.string "ssh_key"
t.string "provider"
t.string "uid"
t.string "ssh_key"
t.string "first_name"
t.string "last_name"
t.integer "user_id"
t.boolean "email_notifications", default: false
t.index ["email"], name: "index_users_on_email", unique: true
Expand All @@ -146,8 +146,6 @@
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["request_id"], name: "index_users_assigned_to_requests_on_request_id"
t.index ["user_id"], name: "index_users_assigned_to_requests_on_user_id"
end

create_table "users_virtual_machine_configs", id: false, force: :cascade do |t|
Expand Down