Merge "Fix allowlisting restricted permissions for secondary users on app upgrade." into sc-dev