Added isHidden check, rename CHECKACL to HASREADACCESS

isHidden will not improve performance..
use permissioncheck function of sqlite

replaced local function