added access check

Signed-off-by: abbr <wenfred@gmail.com>