authority 2.4.2 → 2.4.3
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.
- data/CHANGELOG.markdown +4 -0
 - data/README.markdown +1 -2
 - data/lib/authority/controller.rb +3 -3
 - data/lib/authority/version.rb +1 -1
 - metadata +4 -4
 
    
        data/CHANGELOG.markdown
    CHANGED
    
    | 
         @@ -2,6 +2,10 @@ 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Authority does its best to use [semantic versioning](http://semver.org).
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
      
 5 
     | 
    
         
            +
            ## v2.4.3
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Bugfix for Rails 3.1 - apparently its `class_attribute` method stepped on instance methods even when given `:instance_reader => false`
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       5 
9 
     | 
    
         
             
            ## v2.4.2
         
     | 
| 
       6 
10 
     | 
    
         | 
| 
       7 
11 
     | 
    
         
             
            Bugfix - make `authority_resource` inheritable. For instance, if you call `authorize_actions_for Llama` in one controller, a child controller does the same unless told otherwise.
         
     | 
    
        data/README.markdown
    CHANGED
    
    | 
         @@ -6,8 +6,7 @@ Authority will work fine with a standalone app or a single sign-on system. You c 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
            It requires that you already have some kind of user object in your application, accessible from all controllers and views via a method like `current_user` (configurable).
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
            <!-- [](https://gemnasium.com/nathanl/authority) -->
         
     | 
| 
      
 9 
     | 
    
         
            +
            [](http://travis-ci.org/nathanl/authority)
         
     | 
| 
       11 
10 
     | 
    
         
             
            [](https://codeclimate.com/github/nathanl/authority)
         
     | 
| 
       12 
11 
     | 
    
         | 
| 
       13 
12 
     | 
    
         
             
            ## Contents
         
     | 
    
        data/lib/authority/controller.rb
    CHANGED
    
    | 
         @@ -14,7 +14,7 @@ module Authority 
     | 
|
| 
       14 
14 
     | 
    
         | 
| 
       15 
15 
     | 
    
         
             
                included do
         
     | 
| 
       16 
16 
     | 
    
         
             
                  rescue_from(Authority::SecurityViolation, :with => Authority::Controller.security_violation_callback)
         
     | 
| 
       17 
     | 
    
         
            -
                  class_attribute :authority_resource, instance_reader 
     | 
| 
      
 17 
     | 
    
         
            +
                  class_attribute :authority_resource, :instance_reader => false
         
     | 
| 
       18 
18 
     | 
    
         
             
                end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                module ClassMethods
         
     | 
| 
         @@ -89,10 +89,10 @@ module Authority 
     | 
|
| 
       89 
89 
     | 
    
         
             
                # The `before_filter` that will be setup to run when the class method
         
     | 
| 
       90 
90 
     | 
    
         
             
                # `authorize_actions_for` is called
         
     | 
| 
       91 
91 
     | 
    
         
             
                def run_authorization_check
         
     | 
| 
       92 
     | 
    
         
            -
                  authorize_action_for  
     | 
| 
      
 92 
     | 
    
         
            +
                  authorize_action_for instance_authority_resource
         
     | 
| 
       93 
93 
     | 
    
         
             
                end
         
     | 
| 
       94 
94 
     | 
    
         | 
| 
       95 
     | 
    
         
            -
                def  
     | 
| 
      
 95 
     | 
    
         
            +
                def instance_authority_resource
         
     | 
| 
       96 
96 
     | 
    
         
             
                  return self.class.authority_resource       if self.class.authority_resource.is_a?(Class)
         
     | 
| 
       97 
97 
     | 
    
         
             
                  send(self.class.authority_resource)
         
     | 
| 
       98 
98 
     | 
    
         
             
                rescue NoMethodError => e
         
     | 
    
        data/lib/authority/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: authority
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.4.3
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -10,7 +10,7 @@ authors: 
     | 
|
| 
       10 
10 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       11 
11 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       12 
12 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       13 
     | 
    
         
            -
            date: 2013-02- 
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2013-02-20 00:00:00.000000000 Z
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies:
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       16 
16 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       89 
89 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       90 
90 
     | 
    
         
             
                  segments:
         
     | 
| 
       91 
91 
     | 
    
         
             
                  - 0
         
     | 
| 
       92 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 92 
     | 
    
         
            +
                  hash: 4595590261951067039
         
     | 
| 
       93 
93 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       94 
94 
     | 
    
         
             
              none: false
         
     | 
| 
       95 
95 
     | 
    
         
             
              requirements:
         
     | 
| 
         @@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       98 
98 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       99 
99 
     | 
    
         
             
                  segments:
         
     | 
| 
       100 
100 
     | 
    
         
             
                  - 0
         
     | 
| 
       101 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 101 
     | 
    
         
            +
                  hash: 4595590261951067039
         
     | 
| 
       102 
102 
     | 
    
         
             
            requirements: []
         
     | 
| 
       103 
103 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       104 
104 
     | 
    
         
             
            rubygems_version: 1.8.24
         
     |