added permission verification for search