added upgrade permission related functions to standalone