check  permission to control database