Is there a way to update object sharing with Fusion 2.0? | Community
Skip to main content
Level 2
August 18, 2021
Solved

Is there a way to update object sharing with Fusion 2.0?

  • August 18, 2021
  • 4 replies
  • 2574 views

I have assigned users to an issue, but when I do they are added with manage permissions. I would prefer to update the sharing on the issue, and simply share the issue with contribute access. Does anyone know if that is possible through the API?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by katothompson1

So I tried using API version 11 and it still didn't work, but Customer Support (Thanks Russel!!) had a second solution which did work on our instance of Workfront.

The accessorID, accessorObjCode, and coreAction fields are in the accessRules collection, and can be updated on the object instead of the share endpoint.

URL = OPTASK/<issue ID>?fields=accessRules

Method = PUT

Body = {"accessRules":[{"accessorID":"<ID>","accessorObjCode":"USER","coreAction":"VIEW"}]}

Possible values for coreAction turned out to be "VIEW", "LIMITED_EDIT", and "EDIT" instead of view, contribute, and manage.

Again, thanks for your help!

Regards,

Kato

4 replies

jrieth
Level 3
August 19, 2021

Until you get the Fusion answer, you could edit the project access defaults as shown below. The edit can be made in bulk. Apologies if you already know that. :) ~Jeff

Level 2
August 19, 2021

Thanks Jeff! We do have our templates set up for project access defaults to give manage access to the task when someone is assigned. For our business process we need to assign some people with manage and others with contribute access.

Community Advisor
August 19, 2021

Hi Kato,

Yes, you can use Fusion to trigger updates to an object's security settings. The two screenshots below show a sample from our environment that trigger the automatic update of the Sharing settings on the Portfolio object to grant Manage to a particular Group.

The query string below contains:

  1. The ID of the portfolio record to be updated (in our use-case, an earlier module in this scenario auto-creates that Portfolio object)
  2. The new security setting needed (Manage, Contribute)
  3. What kind of object you're sharing to (Group, Team, Company)
  4. The ID of that object as the 'accessorID'.

All of that being said, if you want 'Contribute' to simply be the default access-type given to assignees for ALL issues or issues in one particular queue etc, then Jeff's solution is more elegant than relying on Fusion.

If you can elaborate on the use-case, we can maybe give better guidance.

Katherine

Level 2
August 19, 2021

Hi Katherine, thanks for your help!

When I try to run the custom API call to PORT/share or OPTASK/share and provide the key:value pairs following your example, I get an error 'accessorObjCode cannot be null'. I tried this with a group and a user, and received the same error message in both cases.

I'm using the default version of the API. Is it possible you are using an earlier version?

Community Advisor
August 19, 2021

I haven't explicitly selected an API version, though if I check Advanced Settings to see that info, it seems to indicate it's using API 11? Give that a try and see if it works for you.

If not, can you show screenshots of your setup?

katothompson1AuthorAccepted solution
Level 2
August 19, 2021

So I tried using API version 11 and it still didn't work, but Customer Support (Thanks Russel!!) had a second solution which did work on our instance of Workfront.

The accessorID, accessorObjCode, and coreAction fields are in the accessRules collection, and can be updated on the object instead of the share endpoint.

URL = OPTASK/<issue ID>?fields=accessRules

Method = PUT

Body = {"accessRules":[{"accessorID":"<ID>","accessorObjCode":"USER","coreAction":"VIEW"}]}

Possible values for coreAction turned out to be "VIEW", "LIMITED_EDIT", and "EDIT" instead of view, contribute, and manage.

Again, thanks for your help!

Regards,

Kato

undu82
Level 2
September 6, 2024

This one works for me, task sharing example.