Returning a 401 if user want to view a layer but has not a view_resourcebase permission