Revision f334cdf7

View differences:

src/authm_mad/simple_permissions.rb
65 65
            
66 66
        when 'USE'
67 67
            if %w{VM NET IMAGE}.include? object
68
                auth_result = ((owner == uid) | pub=='1')
68
                auth_result = ((owner == uid) | (pub=='1'))
69 69
            elsif object == 'HOST'
70 70
                auth_result=true
71 71
            end
src/authm_mad/spec/simple_permissions_spec.rb
92 92
        @perm.auth(1, gen_tokens(1, :create, :host => false)).should == true
93 93
        @perm.auth(1, gen_tokens(1, :delete, :host => false)).should == true
94 94
        @perm.auth(1, gen_tokens(1, :manage, :host => false)).should == true
95
        @perm.auth(1, gen_tokens(1, :use)).should == true        
95
        @perm.auth(1, gen_tokens(1, :use)).should == true
96 96
    end
97 97
end
98 98

  

Also available in: Unified diff