Skip to content
Snippets Groups Projects
Commit b27f990d authored by Kamil Trzciński's avatar Kamil Trzciński
Browse files

Merge branch 'access_token' into 'master'

Remove old sessions in order to force a new access_token access

/cc @vsizov @jacobvosmaer

See merge request !188
parents 4eebf960 c9b153e7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,12 +12,6 @@ class ApplicationController < ActionController::Base
 
def current_user
@current_user ||= session[:current_user]
# Backward compatibility. Until 7.13 user session doesn't contain access_token
# Users with old session should be logged out
return nil if @current_user && @current_user.access_token.nil?
@current_user
end
 
def sign_in(user)
Loading
Loading
class TruncateSessions < ActiveRecord::Migration
def up
execute('DELETE FROM sessions')
end
def down
execute('DELETE FROM sessions')
end
end
Loading
Loading
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
 
ActiveRecord::Schema.define(version: 20150616001155) do
ActiveRecord::Schema.define(version: 20150706103229) do
 
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Loading
Loading
@@ -175,7 +175,7 @@ ActiveRecord::Schema.define(version: 20150616001155) do
add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
 
create_table "variables", force: true do |t|
t.integer "project_id", null: false
t.integer "project_id", null: false
t.string "key"
t.text "value"
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment