5.8 User.RevokeAccess
RevokeAccess(filename string, recipientUsername string) (err error)
Given a
filename
in the personal namespace of the caller, this function revokes access to the corresponding file fromrecipientUsername
and any other users with whomrecipientUsername
has shared the file.A revoked user must lose access to the corresponding file regardless of whether their invitation state is created or accepted.
The client MUST prevent any revoked user from using the client API to take any action on the file. However, recall from Threat Model that a revoked user may become malicious and use the Datastore API directly (see Sharing and Revoking).
After revocation, the client MUST return an error if the revoked user attempts to take action through the Client API on the file, with one exception: the case in which a user calls StoreFile on a file that has been revoked is undefined behavior and will not be tested.
You may assume this function will only be called by the file owner on recipients with whom they directly shared the file (see Sharing and Revoking).
Returns an error if:
- The given
filename
does not exist in the caller’s personal file namespace.- The given
filename
is not currently shared withrecipientUsername
.- Revocation cannot complete due to malicious action.
- Parameters
-
filename (string) - the name of the file in the caller’s personal file namespace
recipientUsername (string) - username of the user to revoke access from - Return
-
err (error)
- All Sharing and Revoking requirements.