diff --git a/src/authm_mad/simple_permissions.rb b/src/authm_mad/simple_permissions.rb index 28ee76af14..81862e302f 100644 --- a/src/authm_mad/simple_permissions.rb +++ b/src/authm_mad/simple_permissions.rb @@ -65,7 +65,7 @@ class SimplePermissions when 'USE' if %w{VM NET IMAGE}.include? object - auth_result = ((owner == uid) | pub=='1') + auth_result = ((owner == uid) | (pub=='1')) elsif object == 'HOST' auth_result=true end diff --git a/src/authm_mad/spec/simple_permissions_spec.rb b/src/authm_mad/spec/simple_permissions_spec.rb index 68c49621e2..55c62f9275 100644 --- a/src/authm_mad/spec/simple_permissions_spec.rb +++ b/src/authm_mad/spec/simple_permissions_spec.rb @@ -92,7 +92,7 @@ describe SimplePermissions do @perm.auth(1, gen_tokens(1, :create, :host => false)).should == true @perm.auth(1, gen_tokens(1, :delete, :host => false)).should == true @perm.auth(1, gen_tokens(1, :manage, :host => false)).should == true - @perm.auth(1, gen_tokens(1, :use)).should == true + @perm.auth(1, gen_tokens(1, :use)).should == true end end