Merge changes I6f314a65,I8020f029 into sc-dev

* changes:
  Properly fix allowlisting restricted permissions for secondary users on app upgrade.
  Revert "Fix allowlisting restricted permissions for secondary users on app"