An SQL based permission system