remove redirect hack for devise
only expose routes from devise that we actually use
This commit is contained in:
parent
86e75a02bb
commit
be47c6bcd0
7 changed files with 12 additions and 13 deletions
|
|
@ -30,6 +30,6 @@
|
||||||
= t("layouts.header.profile")
|
= t("layouts.header.profile")
|
||||||
= person_image_tag(current_user, size: :thumb_small)
|
= person_image_tag(current_user, size: :thumb_small)
|
||||||
%li= link_to t("_contacts"), contacts_path
|
%li= link_to t("_contacts"), contacts_path
|
||||||
%li= link_to t("layouts.header.settings"), users_edit_path
|
%li= link_to t("layouts.header.settings"), edit_user_path
|
||||||
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
|
%li= link_to t("layouts.application.toggle"), toggle_mobile_path
|
||||||
%li= link_to t("layouts.header.logout"), destroy_user_session_path, method: :delete
|
%li= link_to t("layouts.header.logout"), destroy_user_session_path, method: :delete
|
||||||
|
|
|
||||||
|
|
@ -115,12 +115,11 @@ Diaspora::Application.routes.draw do
|
||||||
get "getting_started_completed" => :getting_started_completed
|
get "getting_started_completed" => :getting_started_completed
|
||||||
end
|
end
|
||||||
|
|
||||||
# This is a hack to overide a route created by devise.
|
devise_for :users, controllers: {sessions: :sessions}, skip: :registration
|
||||||
# I couldn't find anything in devise to skip that route, see Bug #961
|
devise_scope :user do
|
||||||
get 'users/edit' => redirect('/user/edit')
|
get "/users/sign_up" => "registrations#new", :as => :new_user_registration
|
||||||
|
post "/users" => "registrations#create", :as => :user_registration
|
||||||
devise_for :users, :controllers => {:registrations => "registrations",
|
end
|
||||||
:sessions => "sessions"}
|
|
||||||
|
|
||||||
#legacy routes to support old invite routes
|
#legacy routes to support old invite routes
|
||||||
get 'users/invitation/accept' => 'invitations#edit'
|
get 'users/invitation/accept' => 'invitations#edit'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Feature: Change email
|
||||||
|
|
||||||
Scenario: Change my email
|
Scenario: Change my email
|
||||||
Given I am signed in
|
Given I am signed in
|
||||||
When I go to the users edit page
|
When I go to the edit user page
|
||||||
And I fill in the following:
|
And I fill in the following:
|
||||||
| user_email | new_email@newplac.es |
|
| user_email | new_email@newplac.es |
|
||||||
And I press "Change email"
|
And I press "Change email"
|
||||||
|
|
@ -14,7 +14,7 @@ Feature: Change email
|
||||||
|
|
||||||
Scenario: Change my email preferences
|
Scenario: Change my email preferences
|
||||||
Given I am signed in
|
Given I am signed in
|
||||||
When I go to the users edit page
|
When I go to the edit user page
|
||||||
And I uncheck "user_email_preferences_mentioned"
|
And I uncheck "user_email_preferences_mentioned"
|
||||||
And I press "change_email_preferences"
|
And I press "change_email_preferences"
|
||||||
Then I should see "Email notifications changed"
|
Then I should see "Email notifications changed"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Feature: Change password
|
||||||
|
|
||||||
Scenario: Change my password
|
Scenario: Change my password
|
||||||
Given I am signed in
|
Given I am signed in
|
||||||
When I go to the users edit page
|
When I go to the edit user page
|
||||||
And I fill out change password section with my password and "newsecret" and "newsecret"
|
And I fill out change password section with my password and "newsecret" and "newsecret"
|
||||||
And I press "Change password"
|
And I press "Change password"
|
||||||
Then I should see "Password changed"
|
Then I should see "Password changed"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Feature: Close account
|
||||||
|
|
||||||
Scenario: user closes account
|
Scenario: user closes account
|
||||||
Given I am signed in
|
Given I am signed in
|
||||||
When I go to the users edit page
|
When I go to the edit user page
|
||||||
And I click on selector "#close_account"
|
And I click on selector "#close_account"
|
||||||
Then I should see a modal
|
Then I should see a modal
|
||||||
And I should see "Hey, please don’t go!" within "#closeAccountModal"
|
And I should see "Hey, please don’t go!" within "#closeAccountModal"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Feature: Change password
|
||||||
|
|
||||||
Scenario: Change my password
|
Scenario: Change my password
|
||||||
Given I am signed in on the mobile website
|
Given I am signed in on the mobile website
|
||||||
When I go to the users edit page
|
When I go to the edit user page
|
||||||
And I fill out change password section with my password and "newsecret" and "newsecret"
|
And I fill out change password section with my password and "newsecret" and "newsecret"
|
||||||
And I press "Change password"
|
And I press "Change password"
|
||||||
Then I should see "Password changed"
|
Then I should see "Password changed"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ Feature: Close account
|
||||||
|
|
||||||
Scenario: user closes account
|
Scenario: user closes account
|
||||||
Given I am signed in on the mobile website
|
Given I am signed in on the mobile website
|
||||||
When I go to the users edit page
|
When I go to the edit user page
|
||||||
And I click on selector "#close_account"
|
And I click on selector "#close_account"
|
||||||
Then I should see a modal
|
Then I should see a modal
|
||||||
And I should see "Hey, please don’t go!" within "#closeAccountModal"
|
And I should see "Hey, please don’t go!" within "#closeAccountModal"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue