before permissions change