Handle database view permission and demo ajax