caboose-cms 0.3.90 → 0.3.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTUzNGI0MTc3Mzc3Njg0ZGMyZWRmNDM1OThjOTU4YTUwMWIxZjMyOQ==
4
+ ZWJlYWJiMWRhNDA4MjY4ZTBhNTNkZDhjMjc4OTVmYTcxNmJhZTFmYw==
5
5
  data.tar.gz: !binary |-
6
- NmJlMDY1NDE5OTg1YzlmZjRmYmJkNmFmODE2ZGQ4MDczOGRlODM3Mw==
6
+ NWFiYTE5NGZlYmNmZGFiZTg1Y2I0ZTUxMjI1NzI3MzVmMTI2ODcyMA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzdiYmNlNDFhZTg2YWE2NTFhNDlmMzA0YjhmZGE0MTI0ZjVhNTBjMTU3NzY5
10
- N2UyNWUxNDU1MGE1ZDViMTJkNTIyODFkNjU1ZWM2MTY3Y2RmOGZhMzAxMGVi
11
- NjJlMzAyNTkyMDg5OTU0MGYyNjg1N2FmNTJhMjRlMzYyOTg5ODg=
9
+ MTgyNGJmMGI3ZGE2NGRmYTc4ZWZmNGU1N2E3MjYyZmQ0N2I5ODU5OTNjMzQ0
10
+ MWVmZmY0ZGM4NjQ0ODEzNmE2MjM5OTU4MzliY2MyNTAzNzA4OTVkMzMzZmQw
11
+ OTY3ZjIwNmRkMDk0NGQyZWIxODBmY2QxNjgyNTcyZjBmZWI1ZTY=
12
12
  data.tar.gz: !binary |-
13
- ZGJjZGI5MmIzOWZlODAzOTAwODQ3M2JmNDNkMzY3ZjRmNTEzMDBmODE0ZjYw
14
- N2YyN2RmYTY2YjU4YTA1MDMyMzNhZDUyZDA4NWIxYThkNjdhODE2NmU1Yjgz
15
- ZTg0MzYyMTgzODM5NGRjYTdhZTYyZWIwMzcwYWYwMTRiMjI0YzA=
13
+ YmUzYThlZWFjNjc1YzQ2ZTU1ZjVjOTA1OWY4MjRiYzkzZWE2MjY3MGFkMjRk
14
+ ODgwZmVkZGE2MmNjN2M0MjU3YzBhNzIyYzk1YzJlYTQ2NTg0ODk5MzUwOTI3
15
+ NmYyMWNiZjY0YzYxOGMzZmIxYzUxN2E2NjY5YmVhNGM1NDBkZmU=
@@ -69,6 +69,7 @@ module Caboose
69
69
  # Logs a user out
70
70
  def logout_user
71
71
  cookies.delete(:caboose_user_id)
72
+ session["app_user"] = nil
72
73
  reset_session
73
74
  end
74
75
 
@@ -2,7 +2,9 @@ module Caboose
2
2
  class LogoutController < ApplicationController
3
3
  # GET /logout
4
4
  def index
5
- logout_user
5
+ logout_user
6
+ elo = User.find(User::LOGGED_OUT_USER_ID)
7
+ login_user(elo)
6
8
  redirect_to "/"
7
9
  end
8
10
  end
@@ -19,8 +19,8 @@ module Caboose
19
19
  return
20
20
  end
21
21
 
22
- user = logged_in_user
23
- if !user.is_allowed(page, 'view')
22
+ user = logged_in_user
23
+ if !user.is_allowed(page, 'view')
24
24
  if user.id == User::LOGGED_OUT_USER_ID
25
25
  redirect_to "/modal/login?return_url=" + URI.encode(request.fullpath)
26
26
  return
@@ -22,11 +22,13 @@ class Caboose::User < ActiveRecord::Base
22
22
  end
23
23
 
24
24
  def self.logged_out_user
25
- return self.where('username' => 'elo').first
25
+ #return self.where('username' => 'elo').first
26
+ return self.where(:id => self::LOGGED_OUT_USER_ID).first
26
27
  end
27
28
 
28
29
  def self.logged_out_user_id
29
- return self.where('username' => 'elo').limit(1).pluck(:id)[0]
30
+ #return self.where('username' => 'elo').limit(1).pluck(:id)[0]
31
+ return self::LOGGED_OUT_USER_ID
30
32
  end
31
33
 
32
34
  def is_allowed(resource, action)
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.3.90'
2
+ VERSION = '0.3.91'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.90
4
+ version: 0.3.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry