사용자 정의 클레임 제공 업체 - 사람들이 피커에 표시되지 않은 결과

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/101888

  •  28-09-2020
  •  | 
  •  

문제

사용자 정의 클레임 제공 업체를 구현했습니다.사람들 선택 프로그램에 용어를 입력하면 공급자가 쿼리하고 일치하는 Pucerentity 객체 목록을 반환합니다.

디버깅은 올바른 수의 PuctenTentity 객체가 SharePoint로 다시 전송되는 것을 보여줍니다. 그러나 Pister Picker는이를 표시하지 않습니다.그러나 x 결과를 보여주는 '표시를 보여주는 문자열은 표시됩니다.

My FillSearch 메소드는 다음과 같습니다.

        protected override void FillSearch(Uri context, string[] entityTypes, string searchValue, string hierarchyNodeID, int maxCount, SPProviderHierarchyTree searchTree)
        {
            // Ensure that People Picker is asking for the type of entity that we 
            // return; site collection administrator will not return, for example.
            if (!EntityTypesContain(entityTypes, SPClaimEntityTypes.FormsRole)) { return; }

            List<PickerEntity> matches = new List<PickerEntity>();

            /*
            removed code that retrieves the matches
            */

            searchTree.AddEntities(matches);
        }
.

일치 목록을 채우는 코드는 다음 방법을 호출하여 다음 방법을 호출합니다

private PickerEntity GetPickerEntity(string claimValue)
{
    PickerEntity pickerEntity = CreatePickerEntity();

    pickerEntity.Claim = CreateClaim(BaseClaimType, claimValue, StringClaimValueType);
    pickerEntity.Description = ProviderDisplayName + ":" + claimValue;
    pickerEntity.DisplayText = claimValue;
    pickerEntity.EntityData[PeopleEditorEntityDataKeys.DisplayName] = claimValue;
    pickerEntity.EntityType = SPClaimEntityTypes.FormsRole;
    pickerEntity.IsResolved = true;

    return pickerEntity;
}
.

결과를 어떻게 표시 할 수 있습니까?

사용자 지정 공급자가 쿼리 된 후 사용자 선택기를 보여주는 이미지

도움이 되었습니까?

해결책

이것은 활성화 문제로 밝혀졌습니다.사용자 정의 공급자 코드의 배포 사이에서 FillClaimTypes 및 FillClaimValueTypes 메소드가 호출되지 않았습니다.

i는 SP2013ClaimStools 를 다시 활성화했습니다.FillclaimTypes 및 FillclaimValueTypes 방법이 호출되었으며 모든 것이 예상대로 작동하기 시작했습니다.

다른 팁

나는 당신의 같은 문제가 있었다. FillclaimTypes 방법에있었습니다. 메소드에 지정된 스키마 URL 및 사용자 클레신에 지정된 스키마 URL과 미스 일치가 있습니다. 동일한 스키마 URL을 할당했습니다. 자세한 내용은 HTTP.: //www.lucacostante.com/item/41-custom-claims-provider-results-not-shown-in-people-picker.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top