fix: workaround for VDI snapshots with $snaphot_of which point to themselves

This commit is contained in:
Julien Fontanet 2016-12-02 14:56:19 +01:00
parent 14bca4bbf7
commit 6dc4b4dc1b

View File

@ -30,7 +30,7 @@ const or = (...checkers) => (object, permission) => { // eslint-disable-line no-
const checkMember = (memberName) => (object, permission) => {
const member = object[memberName]
return checkAuthorization(member, permission)
return member !== object.id && checkAuthorization(member, permission)
}
const checkSelf = ({ id }, permission) => {