setAccess
Sets, unsets or changes local secrets for accessing the repository or disables the given access mode.
Examples
To protect both read and write access with the same password:
val password = Password("supersecret")
repo.setAccess(read: AccessChange.Enable(password), write: AccessChange.Enable(password))
Content copied to clipboard
To require password only for writing:
repo.setAccess(read: AccessChange.Enable(null), write: AccessChange.Enable(password))
Content copied to clipboard
To competelly disable write access but leave read access as it was. Warning: this operation is currently irreversibe.
repo.setAccess(read: null, write: AccessChange.Disable)
Content copied to clipboard