mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-16 09:43:18 +09:00
bug in authorization policies
This commit is contained in:
1 parent
4e1e9e5fc2
commit
f334cdf71e
2 files changed
+2
-2
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user