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

hotfix-bootcamp #3412

Open
wants to merge 1 commit into
base: hotfix/bootcamp-member-bypass
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ public class BaseWorkspaceService implements WorkspaceService {

@Value("${codeServer.codespace.filename}")
private String codespaceFileName;

@Value("${codeServer.run.collab.admin}")
private boolean runCollabByAdmin;

@Value("${codeServer.collab.adminbypass.projectname}")
private String collabProjectName;

@Autowired
private WorkspaceAssembler workspaceAssembler;
Expand Down Expand Up @@ -1724,7 +1730,11 @@ public GenericMessage addCollabById(String userId, CodeServerWorkspaceVO vo, Use
if(! (vo.getProjectDetails().getRecipeDetails().getRecipeId().name().toLowerCase().startsWith("public")
|| vo.getProjectDetails().getRecipeDetails().getRecipeId().name().toLowerCase().startsWith("private")
|| vo.getProjectDetails().getRecipeDetails().getRecipeId().name().toLowerCase().equalsIgnoreCase("default"))) {
HttpStatus addGitUser = gitClient.addUserToRepo(gitUser, repoName);
if(runCollabByAdmin && vo.getProjectDetails().getProjectName().equals(collabProjectName)){
gitUser = collabPid;
log.info("Admin for collab bypassed for project name "+collabProjectName);
}
HttpStatus addGitUser = gitClient.addUserToRepo(gitUser, repoName);
if(addGitUser == HttpStatus.UNPROCESSABLE_ENTITY){
log.info("Failed while adding {} as collaborator with status {}", repoName,
userRequestDto.getGitUserName(), addGitUser.name());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ spring:
mvc.pathmatch.matching-strategy: ant_path_matcher
application:
name: dna-codeserver-service
version: 1.2.9
version: 1.2.10
profile:
active: production

Expand Down Expand Up @@ -96,6 +96,7 @@ codeServer:
run.collab.admin: ${RUN_COLLAB_ADMIN:YOUR_COLLAB_BOOLEAN}
collab.pid: ${COLLAB_PID:YOUR_COLLAB_PID}
vault.baseuri: ${CODE_SERVER_VAULT_BASEURI:XXXX}
collab.adminbypass.projectname: ${COLLAB_BYPASS_PROJECTNAME:YOUR_PROJECT_NAME}
codespace.filename: ${CODESPACE_FILE_NAME:YOUR_CODESPACE_FILE_NAME}

swagger.headers.authorization.token: ${SWAGGER_HEADER_AUTH:XXXXXX}
Expand Down