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 whom targetUsername has shared the file. The secure file share invitation(s) should be revoked even if the recipient has not yet called ReceiveFile().

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; or

  • revocation 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:

  1. All Access Tokens requirements.

  2. All Sharing and Revoking requirements.