added permission check for TPL