bcms_cas 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,13 +32,6 @@ module Cms
32
32
  false
33
33
  end
34
34
 
35
- # def cms_access?
36
- # groups.each do |g|
37
- # return true if g.cms_access?
38
- # end
39
- # false
40
- # end
41
-
42
35
  # Returns all sections that this user has rights to view.
43
36
  #
44
37
  # Overrides core behavior of User to avoid including user as part of the query (since temp users doen't exist in the database).
@@ -12,20 +12,20 @@ module Cas
12
12
  def self.included(controller_class)
13
13
  controller_class.send(:include, InstanceMethods)
14
14
 
15
+ # This reorders the filters applied to requests so that CAS authenticates a user first, before Authorization for documents or pages is checked.
15
16
  controller_class.skip_filter :check_access_to_page
17
+ controller_class.skip_filter :try_to_stream_file
18
+
16
19
  controller_class.before_filter CASClient::Frameworks::Rails::GatewayFilter
17
20
  controller_class.before_filter :login_from_cas_ticket
18
- controller_class.before_filter :check_access_to_page_normally
21
+ controller_class.before_filter :try_to_stream_file
22
+ controller_class.before_filter :check_access_to_page
23
+
19
24
  end
20
25
 
21
26
  # Each instance of the controller will gain these methods.
22
27
  module InstanceMethods
23
28
 
24
- # This exists because we want to force this to happen AFTER login_from_cas_ticket. There may be a better way to do this.
25
- def check_access_to_page_normally
26
- check_access_to_page
27
- end
28
-
29
29
  # Attempts to set the current user based on the session attribute set by CAS.
30
30
  def login_from_cas_ticket
31
31
  logger.debug "Checking for cas login. The current_user is '#{@current_user.login}'." if @current_user
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: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
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-05 00:00:00 -04:00
18
+ date: 2010-10-19 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency