implement resource#checkPermission