Only require a readable database for login, not a writable one
This commit is contained in:
parent
19b6221b32
commit
987c52f53e
2 changed files with 4 additions and 56 deletions
|
@ -7,8 +7,8 @@ class UserController < ApplicationController
|
|||
before_filter :authorize_web, :except => [:api_details, :api_gpx_files]
|
||||
before_filter :set_locale, :except => [:api_details, :api_gpx_files]
|
||||
before_filter :require_user, :only => [:account, :go_public, :make_friend, :remove_friend]
|
||||
before_filter :check_database_readable, :except => [:api_details, :api_gpx_files]
|
||||
before_filter :check_database_writable, :only => [:login, :new, :account, :go_public, :make_friend, :remove_friend]
|
||||
before_filter :check_database_readable, :except => [:login, :api_details, :api_gpx_files]
|
||||
before_filter :check_database_writable, :only => [:new, :account, :go_public, :make_friend, :remove_friend]
|
||||
before_filter :check_api_readable, :only => [:api_details, :api_gpx_files]
|
||||
before_filter :require_allow_read_prefs, :only => [:api_details]
|
||||
before_filter :require_allow_read_gpx, :only => [:api_gpx_files]
|
||||
|
|
|
@ -826,38 +826,6 @@ CREATE TABLE schema_migrations (
|
|||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: sessions; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE TABLE sessions (
|
||||
id integer NOT NULL,
|
||||
session_id character varying(255),
|
||||
data text,
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Name: sessions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE SEQUENCE sessions_id_seq
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MINVALUE
|
||||
NO MAXVALUE
|
||||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- Name: sessions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER SEQUENCE sessions_id_seq OWNED BY sessions.id;
|
||||
|
||||
|
||||
--
|
||||
-- Name: user_blocks; Type: TABLE; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -1165,13 +1133,6 @@ ALTER TABLE ONLY oauth_nonces ALTER COLUMN id SET DEFAULT nextval('oauth_nonces_
|
|||
ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY sessions ALTER COLUMN id SET DEFAULT nextval('sessions_id_seq'::regclass);
|
||||
|
||||
|
||||
--
|
||||
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
|
||||
--
|
||||
|
@ -1408,14 +1369,6 @@ ALTER TABLE ONLY relations
|
|||
ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
|
||||
|
||||
|
||||
--
|
||||
-- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY sessions
|
||||
ADD CONSTRAINT sessions_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -1753,13 +1706,6 @@ CREATE INDEX relations_changeset_id_idx ON relations USING btree (changeset_id);
|
|||
CREATE INDEX relations_timestamp_idx ON relations USING btree ("timestamp");
|
||||
|
||||
|
||||
--
|
||||
-- Name: sessions_session_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
||||
CREATE UNIQUE INDEX sessions_session_id_idx ON sessions USING btree (session_id);
|
||||
|
||||
|
||||
--
|
||||
-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
|
||||
--
|
||||
|
@ -2227,6 +2173,8 @@ INSERT INTO schema_migrations (version) VALUES ('20120214210114');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20120219161649');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20120328090602');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('21');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('22');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue