5.8. User.RevokeFile: Revoke file access¶
-
RevokeFile
(filename string, targetUsername string) (error)¶ You may assume this function will only be called by the file owner.
Revokes access to the given file from
targetUsername
and any other users with whomtargetUsername
has shared the file. The secure file share invitation(s) should be revoked even if the recipient has not yet calledReceiveFile()
.Revoked users cannot take any actions on the file (see Sharing and Revoking).
Returns an error if:
the given file does not exist in the caller’s personal file namespace; or
the given file is not currently shared with
targetUsername
; orrevocation cannot complete due to malicious action.
- Parameters
filename (string) – The name of the file in the caller’s personal file namespace.
targetUsername (string) – Username of the user to revoke access from.
- Return type
error
Warning
Do not forget that your design must satisfy all requirements, including:
All Access Tokens requirements.
All Sharing and Revoking requirements.