caishunfeng commented on code in PR #10832:
URL: https://github.com/apache/dolphinscheduler/pull/10832#discussion_r925093219
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java:
##########
@@ -401,7 +403,7 @@ public Result querySchedule(User loginUser, long
projectCode, long processDefine
Project project = projectMapper.queryByCode(projectCode);
// check project auth
- boolean hasProjectAndPerm =
projectService.hasProjectAndPerm(loginUser, project, result);
+ boolean hasProjectAndPerm =
projectService.hasProjectAndPerm(loginUser, project, result, PROJECT);
Review Comment:
PTAL @WangJPLeo
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectServiceImpl.java:
##########
@@ -88,10 +95,11 @@ public class ProjectServiceImpl extends BaseServiceImpl
implements ProjectServic
*/
@Override
@Transactional
- public Map<String, Object> createProject(User loginUser, String name,
String desc) {
+ public Result createProject(User loginUser, String name, String desc) {
+ Result result = new Result();
- Map<String, Object> result = checkDesc(desc);
- if (result.get(Constants.STATUS) != Status.SUCCESS) {
+ if (!StringUtils.isEmpty(desc) && desc.length() > 200) {
Review Comment:
I think it's better to keep the `checkDesc` method, because I found some
places are repeated judgment logic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]