Unblock a user
If you are the website owner, you can unblock users by removing their signing key from the appendable data associated with the current page.
Contents

When you select a user to unblock, the plugin is able to retrieve the serialized signing key of that user from the list of blocked users.
Deserialize the signing key
The plugin deserializes the signing key of the user you want to unblock.
POST /sign-key/deserialise
controller.js
window.safeSignKey.deserialise(this._authToken, new Buffer(this._data.blockedUsers[userName], 'base64'))
The API returns the handle ID for the signing key.
Remove the signing key from the filter
The plugin removes the signing key of the user you want to unblock from the appendable data associated with the current page.
DELETE /appendable-data/filter/:handleId
controller.js
window.safeAppendableData.removeFromFilter(
this._authToken,
this._currentPostHandleId,
[signKeyHandle])
Save the appendable data
The plugin updates the appendable data associated with the current page by sending a POST request to the SAFE Network.
POST /appendable-data/:handleId
controller.js
window.safeAppendableData.post(
this._authToken, this._currentPostHandleId)
Update the structured data for blocked users
The plugin removes the serialized signing key of the user you just unblocked from the list of blocked users for the current page.
controller.js
delete this._data.blockedUsers[userName]
const data = new Buffer(JSON.stringify(this._data.blockedUsers)).toString('base64')
Update the structured data
The plugin updates the structured data with the new list of blocked users.
PATCH /structured-data/:handleId
controller.js
window.safeStructuredData.updateData(
this._authToken,
this._blockedUserStructureDataHandle,
data, this._symmetricCipherOptsHandle)
Save the structured data
The plugin saves the structured data by sending a POST request to the SAFE Network.
POST /structured-data/:handleId
controller.js
window.safeStructuredData.post(
this._authToken, this._blockedUserStructureDataHandle)
Drop the handle for the signing key
The plugin drops the handle that represents the signing key of the user you just unblocked.
DELETE /sign-key/:handleId
controller.js
window.safeSignKey.dropHandle(this._authToken, signKeyHandle)
After the user has been unblocked, the plugin reloads the comments.
Last updated
Was this helpful?