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

3.6 計畫成員 #31

Closed
3 of 4 tasks
ghost opened this issue Nov 21, 2018 · 5 comments
Closed
3 of 4 tasks

3.6 計畫成員 #31

ghost opened this issue Nov 21, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 21, 2018

  • Suggest endpoint /project/{$projectId}/user/add, instead of /project/add-user-to-project
  • Implement /project/{$projectId}/user/delete/{$userId}
  • Main script to work on:
    TaiBIF/camera-trap-api/blob/master/common/models/ctp-user.js

Post

{
  "userId": $userId, // OrcID_XXXX-XXXX-XXXX-XXXX
  "projectId": $projectId, // 欲加入的計畫id
  "role": $role // 角色,
}

Response

{
  "userId": $userId, // OrcID_XXXX-XXXX-XXXX-XXXX
  "projectId": $projectId, // 欲加入的計畫id
  "projectTitle": "", 加入計畫名稱 
  "name": "", // 姓名
  "email": "", // 電子郵件
  "role": $role // 角色,
}

Related to TaiBIF/camera-trap-webapp#64

@ghost ghost assigned trashmai Nov 21, 2018
@ghost ghost added this to To do in API v0 development via automation Nov 21, 2018
@ghost ghost added this to the 計畫資料管理及更新 W1 WF2 WF3 milestone Nov 23, 2018
@ghost ghost added the priority Suggested to work first label Nov 23, 2018
@ghost ghost unassigned trashmai Nov 23, 2018
@rwu823
Copy link
Contributor

rwu823 commented Nov 30, 2018

@cjk-halodule

  • Suggest endpoint /project/user/add, instead of /project/add-user-to-project

這必要換嗎?我怕影響到前端?

@rwu823
Copy link
Contributor

rwu823 commented Nov 30, 2018

權限參考
https://github.com/TaiBIF/camera-trap-api/wiki/role-permission

only allow ProjectManager, Researcher, SysAdmin, ProjectInitiator

@ghost
Copy link
Author

ghost commented Nov 30, 2018

description updated. to implement:

  1. /project/{$projectId}/user/add
  2. /project/{$projectId}/user/delete/{$userId}

@rwu823
Copy link
Contributor

rwu823 commented Nov 30, 2018

#58 API 已完成:

新增 user 角色到專案

POST /project/:projectId/user/add/:userId

{ "role": 'string' }

移除 user 出專案

POST /project/:projectId/user/remove/:userId

@ghost ghost mentioned this issue Dec 9, 2018
5 tasks
@ghost ghost assigned rwu823 Dec 11, 2018
@ghost ghost unassigned rwu823 Apr 23, 2019
@ghost ghost removed the priority Suggested to work first label Apr 23, 2019
@ghost
Copy link
Author

ghost commented Apr 23, 2019

Considered implemented in v1.

@ghost ghost closed this as completed Apr 23, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants