Merge "Revert "RESTRICT AUTOMERGE: Check both self and shared user id package for requested permissions."" into pi-dev