Skip to content

Commit 6b2c42a

Browse files
authored
Removed default population of access policies (#11570)
1 parent ae80518 commit 6b2c42a

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/HealthcareApis/HealthcareApis/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Access policies are no longer defaulted to the current principal
2122

2223
## Version 1.0.1
2324
* Update references in .psd1 to use relative path

src/HealthcareApis/HealthcareApis/HealthcareApis/NewAzureRmHealthcareApisService.cs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,13 @@ private List<ServiceAccessPolicyEntry> GetAccessPolicies()
208208
{
209209
List<ServiceAccessPolicyEntry> accessPolicies = new List<ServiceAccessPolicyEntry>();
210210

211-
if (AccessPolicyObjectId == null || AccessPolicyObjectId.Length == 0)
211+
if (AccessPolicyObjectId != null && AccessPolicyObjectId.Length > 0)
212212
{
213-
string objectID = base.AccessPolicyID;
214-
accessPolicies.Add(new ServiceAccessPolicyEntry(objectID));
215-
return accessPolicies;
216-
}
217-
218-
foreach (var objectID in AccessPolicyObjectId)
219-
{
220-
HealthcareApisArgumentValidator.ValidateObjectId(objectID);
221-
accessPolicies.Add(new ServiceAccessPolicyEntry(objectID));
213+
foreach (var objectID in AccessPolicyObjectId)
214+
{
215+
HealthcareApisArgumentValidator.ValidateObjectId(objectID);
216+
accessPolicies.Add(new ServiceAccessPolicyEntry(objectID));
217+
}
222218
}
223219

224220
return accessPolicies;

0 commit comments

Comments
 (0)