Преглед на файлове

[DS-7896][fix] Fixed the problem of duplicating project names when authorizing projects (#8453)

This closes #7896
Sunny Lei преди 3 години
родител
ревизия
2aed250ed4
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java

+ 2 - 2
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java

@@ -566,9 +566,9 @@ public class UsersServiceImpl extends BaseServiceImpl implements UsersService {
             return result;
         }
 
-        //if the selected projectIds are empty, delete all items associated with the user
+        projectUserMapper.deleteProjectRelation(0, userId);
+
         if (check(result, StringUtils.isEmpty(projectIds), Status.SUCCESS)) {
-            projectUserMapper.deleteProjectRelation(0, userId);
             return result;
         }