Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync team managers from Connect to Direct #34

Closed
parthshah opened this issue Jan 26, 2017 · 4 comments
Closed

Sync team managers from Connect to Direct #34

parthshah opened this issue Jan 26, 2017 · 4 comments

Comments

@parthshah
Copy link
Contributor

parthshah commented Jan 26, 2017

  1. When a manager is added to Connect Project
    • Subscribe to project.member.added event (already done)
    • Retrieve system user token (getSystemUserToken() call)
    • Call direct service to add manager user.
      url: {API_BASE}/v3/direct/projects/{directProjectId}/permissions
      method: POST
      data:
{
  "permissions": [
    {
        "userId": <<userId>>,
        "permissionType": {
          "permissionTypeId": 3,
          "name": "project_full"
        },
        "studio": false
    }
  ]
}
  1. When a manager is removed from a Connect Project
    • Subscribe to project.member.removed event
    • Retrieve system user token (getSystemUserToken() call)
    • Call direct service to remove manager user.
      url: {API_BASE}/v3/direct/projects/{directProjectId}/permissions
      method: POST
      data:
{
  "permissions": [
    {
        "userId": <<userId>>,
        "resourceId": <<directProjectId>>,
        "permissionType": {
          "permissionTypeId": "",
          "name": "project_full"
        },
        "studio": false
    }
  ]
}
@parthshah
Copy link
Contributor Author

➤ Parth commented:
https://app.asana.com/0/95457991781901/95457991781901 does this look right to you? I don't completely follow the permissions api but i am guessing we can change that later if required.

@parthshah
Copy link
Contributor Author

➤ Tony commented:
The add permission is right. For removing, leave the permissionTypeId empty and that will remove them. FireIce is making a more explicit endpoint for the remove function, but that should work for now.

@parthshah
Copy link
Contributor Author

➤ Parth commented:
Ah, that makes a little more sense. Thanks for the clarification. So, leave it blank as in an empty string or null?
Should we wait for the new remove endpoint before we launch this task?

@parthshah
Copy link
Contributor Author

➤ Tony commented:
empty string. We'll keep it backward compatible, so I'd probably go ahead and run with it. We can retro fit once the new endpoint is there. Chinese New Year starts next week so we might not get a ton of activity on that one next week...

@parthshah parthshah modified the milestone: Release v1.4.0 Feb 17, 2017
riteshsangwan pushed a commit to riteshsangwan/tc-project-service that referenced this issue Mar 1, 2017
parthshah pushed a commit that referenced this issue Mar 1, 2017
* update readme, update node js version

* fix #34

* fix #37, keep project history

* move project history update to core API's from event handlers

* fix #43

* add unit tests

* update direct mock service

* update swagger.yaml

* add sync script

* update postman

* update readme

* update tests

* filter members by copilot role, when promoting copilot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant