From 66bd81616531151d2fd5346dc6084996e6781c5e Mon Sep 17 00:00:00 2001 From: Patrick Rodgers Date: Fri, 9 Aug 2024 07:47:50 -0400 Subject: [PATCH] Update funcs.ts Addressing await within function, possibly related to #3104 --- packages/sp/security/funcs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sp/security/funcs.ts b/packages/sp/security/funcs.ts index 48b6b9cbd..8d5ce4128 100644 --- a/packages/sp/security/funcs.ts +++ b/packages/sp/security/funcs.ts @@ -28,7 +28,7 @@ export async function getCurrentUserEffectivePermissions(this: SecurableQueryabl * @param clearSubscopes Optional. true to make all child securable objects inherit role assignments from the current object */ export async function breakRoleInheritance(this: SecurableQueryable, copyRoleAssignments = false, clearSubscopes = false): Promise { - await spPost(SPQueryable(this, `breakroleinheritance(copyroleassignments=${copyRoleAssignments}, clearsubscopes=${clearSubscopes})`)); + return spPost(SPQueryable(this, `breakroleinheritance(copyroleassignments=${copyRoleAssignments}, clearsubscopes=${clearSubscopes})`)); } /** @@ -36,7 +36,7 @@ export async function breakRoleInheritance(this: SecurableQueryable, copyRoleAss * */ export async function resetRoleInheritance(this: SecurableQueryable): Promise { - await spPost(SPQueryable(this, "resetroleinheritance")); + return spPost(SPQueryable(this, "resetroleinheritance")); } /**