renderajaxgallyery permission fix