-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support access only collaboration (#1193)
* feat: Support access only collaboration
- Loading branch information
1 parent
be875e8
commit 664c01f
Showing
15 changed files
with
271 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -731,7 +731,7 @@ Add a Collaborator | |
------------------ | ||
|
||
You can invite another person to collaborate on a file by email with | ||
[`collaborate(String emailAddress, BoxCollaboration.Role role, Boolean notify, Boolean canViewPath)`][share-a-file]. | ||
[`collaborate(String emailAddress, BoxCollaboration.Role role, Boolean notify, Boolean canViewPath, Date expiresAt, Boolean isAccessOnly)`][share-a-file]. | ||
|
||
The `notify` parameter will determine if the user or group will receive an | ||
email notification when being added as a collaborator. This option is only | ||
|
@@ -741,7 +741,13 @@ The `canViewPath` parameter allows the invitee to see the entire list of ancesto | |
folders of the associated file. The user will not gain privileges in any ancestor | ||
folder, but will be able to see the whole path to that file in the owner's account. | ||
|
||
Both the `notify` and `canViewPath` parameters can be left as `null`. | ||
The `expiresAt` parameter allows the owner to set a date-time in the future when | ||
the collaboration should expire. | ||
|
||
The `isAccessOnly` parameter allows the owner to set the collaboration to be | ||
access only collaboration. | ||
|
||
The `notify`, `canViewPath`, `expiresAt` and `isAccessOnly` parameters can be left as `null`. | ||
|
||
```java | ||
BoxFile file = new BoxFile(api, "id"); | ||
|
@@ -750,16 +756,16 @@ BoxCollaboration.Info collabInfo = file.collaborate("[email protected]", BoxC | |
|
||
Alternatively, if you know the user's ID, you can invite them directly | ||
without needing to know their email address with the | ||
[`collaborate(BoxCollaborator user, BoxCollaboration.Role role, Boolean notify, Boolean canViewPath)`][share-a-file-userID] | ||
[`collaborate(BoxCollaborator user, BoxCollaboration.Role role, Boolean notify, Boolean canViewPath, Date expiresAt, Boolean isAccessOnly)`][share-a-file-userID] | ||
|
||
```java | ||
BoxUser collaborator = new BoxUser(api, "user-id"); | ||
BoxFile file = new BoxFile(api, "file-id"); | ||
BoxCollaboration.Info collabInfo = file.collaborate(collaborator, BoxCollaboration.Role.EDITOR, true, true); | ||
``` | ||
|
||
[share-a-file]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFile.html#collaborate-java.lang.String-com.box.sdk.BoxCollaboration.Role-java.lang.Boolean-java.lang.Boolean- | ||
[share-a-file-userID]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFile.html#collaborate-com.box.sdk.BoxCollaborator-com.box.sdk.BoxCollaboration.Role-java.lang.Boolean-java.lang.Boolean- | ||
[share-a-file]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFile.html#collaborate-java.lang.String-com.box.sdk.BoxCollaboration.Role-java.lang.Boolean-java.lang.Boolean-java.lang.String-java.util.Date-java.lang.Boolean- | ||
[share-a-file-userID]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFile.html#collaborate-com.box.sdk.BoxCollaborator-com.box.sdk.BoxCollaboration.Role-java.lang.Boolean-java.lang.Boolean-java.lang.String-java.util.Date-java.lang.Boolean- | ||
|
||
|
||
Get an Embed Link | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.