bcms_cas 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ module Cas
2
+ module Acts
3
+ module ContentPage
4
+
5
+ def try_to_stream_file
6
+ # Do nothing. Needed to avoid breakage for actions that include Cms::Authentication as well as Cms::Act::ContentPage.
7
+ end
8
+ end
9
+ end
10
+ end
11
+ Cms::Acts::ContentPage.send(:include, Cas::Acts::ContentPage)
data/lib/bcms_cas.rb CHANGED
@@ -2,3 +2,5 @@ require 'bcms_cas/routes'
2
2
  require 'bcms_cas/configuration'
3
3
  require 'bcms_cas/authentication'
4
4
  require 'bcms_cas/login_portlet_extension'
5
+ require 'bcms_cas/acts_as_content_page_extention'
6
+
@@ -21,9 +21,12 @@ class CasAuthTest < ActiveSupport::TestCase
21
21
 
22
22
  def setup
23
23
  MyController.expects(:skip_filter).with(:check_access_to_page)
24
+ MyController.expects(:skip_filter).with(:try_to_stream_file)
25
+
24
26
  MyController.expects(:before_filter).with(CASClient::Frameworks::Rails::GatewayFilter)
25
27
  MyController.expects(:before_filter).with(:login_from_cas_ticket)
26
- MyController.expects(:before_filter).with(:check_access_to_page_normally)
28
+ MyController.expects(:before_filter).with(:try_to_stream_file)
29
+ MyController.expects(:before_filter).with(:check_access_to_page)
27
30
 
28
31
  MyController.send(:include, Cas::Authentication)
29
32
 
@@ -34,13 +37,6 @@ class CasAuthTest < ActiveSupport::TestCase
34
37
  end
35
38
 
36
39
 
37
- test "Alias's the existing filter to a different name." do
38
- c = MyController.new
39
- c.expects(:check_access_to_page)
40
-
41
- c.check_access_to_page_normally
42
- end
43
-
44
40
  test "adds current_user and login from session to class" do
45
41
  c = MyController.new
46
42
 
@@ -66,7 +62,7 @@ class CasAuthTest < ActiveSupport::TestCase
66
62
  end
67
63
 
68
64
  test "Cms::ContentController gets augmented" do
69
- assert (Cms::ContentController.new.respond_to? :check_access_to_page_normally)
65
+ assert (Cms::ContentController.new.respond_to? :login_from_cas_ticket)
70
66
  end
71
67
 
72
68
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcms_cas
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 2
10
- version: 1.1.2
9
+ - 3
10
+ version: 1.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - BrowserMedia
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-19 00:00:00 -04:00
18
+ date: 2010-10-25 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -60,6 +60,7 @@ files:
60
60
  - app/models/cms/temporary_user.rb
61
61
  - db/migrate/20091002162550_add_cas_user_group.rb
62
62
  - lib/bcms_cas.rb
63
+ - lib/bcms_cas/acts_as_content_page_extention.rb
63
64
  - lib/bcms_cas/authentication.rb
64
65
  - lib/bcms_cas/configuration.rb
65
66
  - lib/bcms_cas/login_portlet_extension.rb