Merge "Validate the user is allowed to set UiMode" into main