2

I haven't been able to find any info about this, whether or not it's possible.

I'm writing an external app that I want to give the ability to really put projects on hold (i.e. browse only, can't create/modify/etc... issues), and remove that hold. Everything is working fine in terms of the communication between the two apps, but I can't find the API hook to change the permission scheme associated with a project.

Can anyone point me in the right direction or tell me if this is just something that can't be done?

4

1 回答 1

2

有可能的。

首先,您应该使用ProjectService 类中的validateUpdateProjectSchemes(要获取 projectService 对象,您只需将其注入到构造函数中)。

UpdateProjectSchemesValidationResult validationResult = projectService.validateUpdateProjectSchemes(
    user,
    permissionSchemeID,
    null,
    null);

然后,检查验证结果是否有效,并使用updateProjectSchemes方法使用选择的权限方案实际更新项目:

if (validationResult.isValid()){
    projectService.updateProjectSchemes(validationResult, project);
}
于 2013-01-17T22:01:23.240 回答