Fix privilege checking queries

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Make privilege checking adhere to DisableIS

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Fix failings tests

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>