Merge "Update permissions flags for all users before restoring" into rvc-dev