@@ -618,8 +618,9 @@ async function addCopilot (userId, projectId, currentUser) {
618
618
// get direct project id from projects api
619
619
const directProjectId = await getDirectProjectId ( connection , projectId )
620
620
621
+ // NOTE: we don't check permission this way, see why https://github.com/topcoder-platform/tc-project-service/issues/524#issuecomment-616541539
621
622
// Check the current user permission on the project
622
- await checkAndGetPermissionId ( connection , directProjectId , currentUser , PERMISSION_TYPE . PROJECT_FULL )
623
+ // await checkAndGetPermissionId(connection, directProjectId, currentUser, PERMISSION_TYPE.PROJECT_FULL)
623
624
624
625
// check if member is assigned as copilot
625
626
const isProjectCopilot = await checkIsProjectCopilot ( connection , directProjectId , copilotProfileId )
@@ -769,8 +770,9 @@ async function addManager (userId, projectId, isManager, currentUser) {
769
770
// get direct project id from projects api
770
771
const directProjectId = await getDirectProjectId ( connection , projectId )
771
772
773
+ // NOTE: we don't check permission this way, see why https://github.com/topcoder-platform/tc-project-service/issues/524#issuecomment-616541539
772
774
// Check the current user permission on the project
773
- await checkAndGetPermissionId ( connection , directProjectId , currentUser , PERMISSION_TYPE . PROJECT_FULL )
775
+ // await checkAndGetPermissionId(connection, directProjectId, currentUser, PERMISSION_TYPE.PROJECT_FULL)
774
776
775
777
const users = await getAllManagers ( connection , directProjectId , metadataKeyId )
776
778
@@ -846,8 +848,9 @@ async function removeCopilot (userId, projectId, currentUser) {
846
848
// get direct project id from projects api
847
849
const directProjectId = await getDirectProjectId ( connection , projectId )
848
850
851
+ // NOTE: we don't check permission this way, see why https://github.com/topcoder-platform/tc-project-service/issues/524#issuecomment-616541539
849
852
// Check the current user permission on the project
850
- await checkAndGetPermissionId ( connection , directProjectId , currentUser , PERMISSION_TYPE . PROJECT_FULL )
853
+ // await checkAndGetPermissionId(connection, directProjectId, currentUser, PERMISSION_TYPE.PROJECT_FULL)
851
854
852
855
// check if member is assigned as copilot
853
856
const isProjectCopilot = await checkIsProjectCopilot ( connection , directProjectId , copilotProfileId )
@@ -937,8 +940,9 @@ async function removeManager (userId, projectId, isManager, currentUser) {
937
940
// get direct project id from projects api
938
941
const directProjectId = await getDirectProjectId ( connection , projectId )
939
942
943
+ // NOTE: we don't check permission this way, see why https://github.com/topcoder-platform/tc-project-service/issues/524#issuecomment-616541539
940
944
// Check the current user permission on the project
941
- await checkAndGetPermissionId ( connection , directProjectId , currentUser , PERMISSION_TYPE . PROJECT_FULL )
945
+ // await checkAndGetPermissionId(connection, directProjectId, currentUser, PERMISSION_TYPE.PROJECT_FULL)
942
946
943
947
const users = await getAllManagers ( connection , directProjectId , metadataKeyId )
944
948
0 commit comments