/// <summary> /// Returns all authority groups (data-access or not) /// that have access to the study not through direct data access assignment but through other means, such as administrative tokens /// </summary> /// <param name="studyStorage"></param> /// <returns></returns> public IList <AuthorityGroupStudyAccessInfo> ListAuthorityGroupsForStudyViaToken(StudyStorage studyStorage) { // list all Authority Groups (data or non data-access) with permission to access all studies on the same partition var adapter = new ServerPartitionDataAdapter(); IList <AuthorityGroupDetail> groupWithAccessToAllStudies; adapter.GetAuthorityGroupsForPartition(studyStorage.ServerPartitionKey, false, out groupWithAccessToAllStudies); // Convert into AuthorityGroupStudyAccessInfo objects for rendering var result = new List <AuthorityGroupStudyAccessInfo>(); foreach (var groupDetail in groupWithAccessToAllStudies) { result.Add(new AuthorityGroupStudyAccessInfo(groupDetail)); } return(result); }