Geovane - [TS Answers]I would like to allow an...
# dev-help
g
[TS Answers] I would like to allow any user in my system to delete TS Answers. Right now just TS Admin or the Answer's author can do this... Is there a way to bypass this?
a
message has been deleted
g
I also submitted a case (00428971) for this just to keep things documented as well. I just saw it was already responded and it is not possible, but as this is something interesting for us I will leave the thread open in case there is a workaround available.
s
Hello @Geovane : If we want to allow any user to delete the answer, it needs to be shared with Edit access to all users. With Edit access on an answer or Liveboard, users will have permission to delete it.
g
How can I do it automatically by default @Sandeep Yadav ?
s
Hello @Geovane: There isn’t a built-in way to automate this by default. To implement this workflow, you’ll need to run background scripts that call the REST APIs to share answers with a group. A typical approach would be: * Create a group containing all users who should have access * Fetch the relevant answers * Share those answers with the group programmatically You can use the following APIs to build this flow: * POST /api/rest/2.0/metadata/search → Retrieve all answers * POST /api/rest/2.0/groups/create → Create a user group * POST /api/rest/2.0/groups/{group_identifier}/update → Add users to the group * POST /api/rest/2.0/security/metadata/share → Share answers with the group
g
@Sandeep Yadav is there possible for me to as part of my backend server just delete a resource using some kind of admin credentials? or not even admins can delete resources? The main painpoint here is if a person leaves the company, we will end up with garbage and the clean up will be difficult
s
Admins have the ability to delete resources. When a user is removed from the system, ownership of all resources previously owned by that user is automatically transferred to an admin account. If there is a need to explicitly reassign ownership of objects, the following API can be used:
Copy code
POST /api/rest/2.0/security/metadata/assign
This endpoint allows updating the ownership of metadata objects as required.