Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
commit
dd8d52a32d
|
@ -360,9 +360,16 @@ public class TestCaseReviewService {
|
|||
public void testReviewRelevance(ReviewRelevanceRequest request) {
|
||||
String reviewId = request.getReviewId();
|
||||
List<String> userIds = getTestCaseReviewerIds(reviewId);
|
||||
|
||||
String creator = "";
|
||||
TestCaseReview review = testCaseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
if (review != null) {
|
||||
creator = review.getCreator();
|
||||
}
|
||||
|
||||
String currentId = SessionUtils.getUser().getId();
|
||||
if (!userIds.contains(currentId)) {
|
||||
MSException.throwException("非用例评审人员,不能关联用例!");
|
||||
if (!userIds.contains(currentId) && !StringUtils.equals(creator, currentId)) {
|
||||
MSException.throwException("没有权限,不能关联用例!");
|
||||
}
|
||||
|
||||
List<String> testCaseIds = request.getTestCaseIds();
|
||||
|
|
|
@ -87,8 +87,13 @@ public class TestReviewTestCaseService {
|
|||
private void checkReviewer(String reviewId) {
|
||||
List<String> userIds = testCaseReviewService.getTestCaseReviewerIds(reviewId);
|
||||
String currentId = SessionUtils.getUser().getId();
|
||||
if (!userIds.contains(currentId)) {
|
||||
MSException.throwException("非用例评审人员,不能解除用例关联!");
|
||||
TestCaseReview caseReview = testCaseReviewMapper.selectByPrimaryKey(reviewId);
|
||||
String creator = "";
|
||||
if (caseReview != null) {
|
||||
creator = caseReview.getCreator();
|
||||
}
|
||||
if (!userIds.contains(currentId) && !StringUtils.equals(creator, currentId)) {
|
||||
MSException.throwException("没有权限,不能解除用例关联!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue