Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveQuery seems to bypass Record-level Security limit!! #7213

Closed
ghost opened this issue Mar 3, 2017 · 1 comment
Closed

LiveQuery seems to bypass Record-level Security limit!! #7213

ghost opened this issue Mar 3, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Mar 3, 2017

OrientDB Version: 2.2.13 community

Java Version: 1.8.0_101

OS: linux

Expected behavior

When a record created, LiveQuery should catch nothing, if the user is restricted to access this record, even if he can access the class.

Actual behavior

normal select operation returns nothing, but LiveQuery returns the record.

Steps to reproduce

---------step 1--------------------------------------------------------------
create class box
alter class box superclass +ORestricted

//orientjs programm
db.liveQuery('LIVE SELECT FROM box') .on('live-create', function(data){ console.log("new record->",data.content); });
---------step 2--------------------------------------------------------------
insert into box set title=''not-for-z2'

orientjs programm output:
D:\test>node livequery.js
user: z2 is listening...
new record-> { '@type': 'd',
'@Class': 'messageBox',
timestamp: Fri Mar 03 2017 18:17:42 GMT+0800 (中国标准时间),
title: ''not-for-z2',
_allow: [ { [String: '#5:0'] cluster: 5, position: 0 } ] }
---------step 3--------------------------------------------------------------
orientdb console output:
Connecting to database [remote:router.zhiguanyun.com/router] with user 'z2'...OK
orientdb {db=router}> select from box where title=''not-for-z2'

0 item(s) found. Query executed in 0.016 sec(s).

@wolf4ood
Copy link
Member

wolf4ood commented Mar 3, 2017

hi @zhiguan-hanks

thanks for this issue. I've pushed a fix. It will be available in OrientDB 2.2.18

Thanks

@wolf4ood wolf4ood closed this as completed Mar 3, 2017
@wolf4ood wolf4ood added this to the 2.2.18 milestone Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant