Permission refactorisation
Added search error