Added test for sending share invitation to user with expiration
This commit is contained in:
@@ -1585,6 +1585,7 @@ class GraphHelper {
|
||||
* @param string $shareType
|
||||
* @param string|null $role
|
||||
* @param string|null $permission
|
||||
* @param string|null $expireDate
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws \JsonException
|
||||
@@ -1600,7 +1601,8 @@ class GraphHelper {
|
||||
string $shareeId,
|
||||
string $shareType,
|
||||
?string $role,
|
||||
?string $permission
|
||||
?string $permission,
|
||||
?string $expireDate
|
||||
): ResponseInterface {
|
||||
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite");
|
||||
$body = [];
|
||||
@@ -1619,6 +1621,10 @@ class GraphHelper {
|
||||
$body['@libre.graph.permissions.actions'] = ['libre.graph/driveItem/' . $permission];
|
||||
}
|
||||
|
||||
if ($expireDate !== null) {
|
||||
$body['expirationDateTime'] = $expireDate;
|
||||
}
|
||||
|
||||
return HttpRequestHelper::post(
|
||||
$url,
|
||||
$xRequestId,
|
||||
|
||||
Reference in New Issue
Block a user