You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/12/13 03:00:56 UTC
[GitHub] [dolphinscheduler] ouyangyewei opened a new pull request #7356: [Cherry-pick-2.0.2][Feature-7110][dolphinscheduler-api] support grant project by code
ouyangyewei opened a new pull request #7356:
URL: https://github.com/apache/dolphinscheduler/pull/7356
fix: #7110
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] ouyangyewei closed pull request #7356: [Cherry-pick-2.0.2][Feature-7110][dolphinscheduler-api] support grant project by code
Posted by GitBox <gi...@apache.org>.
ouyangyewei closed pull request #7356:
URL: https://github.com/apache/dolphinscheduler/pull/7356
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] codecov-commenter commented on pull request #7356: [Cherry-pick-2.0.2][Feature-7110][dolphinscheduler-api] support grant project by code
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #7356:
URL: https://github.com/apache/dolphinscheduler/pull/7356#issuecomment-992067157
# [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/7356?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> :exclamation: No coverage uploaded for pull request base (`2.0.2-prepare@54a89e9`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#section-missing-base-commit).
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/dolphinscheduler/pull/7356?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## 2.0.2-prepare #7356 +/- ##
================================================
Coverage ? 31.86%
Complexity ? 1567
================================================
Files ? 432
Lines ? 14573
Branches ? 1447
================================================
Hits ? 4644
Misses ? 9481
Partials ? 448
```
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/7356?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/dolphinscheduler/pull/7356?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [54a89e9...b5c77c7](https://codecov.io/gh/apache/dolphinscheduler/pull/7356?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] lenboo commented on a change in pull request #7356: [Cherry-pick-2.0.2][Feature-7110][dolphinscheduler-api] support grant project by code
Posted by GitBox <gi...@apache.org>.
lenboo commented on a change in pull request #7356:
URL: https://github.com/apache/dolphinscheduler/pull/7356#discussion_r767453379
##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java
##########
@@ -578,6 +579,62 @@ public Result queryUserList(User loginUser, String searchVal, Integer pageNo, In
return result;
}
+ /**
+ * grant project by code
+ *
+ * @param loginUser login user
+ * @param userId user id
+ * @param projectCodes project code array
+ * @return grant result code
+ */
+ @Override
+ public Map<String, Object> grantProjectByCode(final User loginUser, final int userId, final String projectCodes) {
+ Map<String, Object> result = new HashMap<>();
+ result.put(Constants.STATUS, false);
+
+ // 1. only admin can operate
+ if (this.check(result, !this.isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) {
+ return result;
Review comment:
'only admin can operate' is maybe not a good idea.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [dolphinscheduler] sonarcloud[bot] commented on pull request #7356: [Cherry-pick-2.0.2][Feature-7110][dolphinscheduler-api] support grant project by code
Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #7356:
URL: https://github.com/apache/dolphinscheduler/pull/7356#issuecomment-992071567
SonarCloud Quality Gate failed. 
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=BUG) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=BUG) [19 Bugs](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=BUG)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=VULNERABILITY)
[](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=SECURITY_HOTSPOT) [](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=SECURITY_HOTSPOT) [3 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=SECURITY_HOTSPOT)
[](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=CODE_SMELL) [306 Code Smells](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=7356&resolved=false&types=CODE_SMELL)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=7356&metric=new_coverage&view=list) [13.7% Coverage](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=7356&metric=new_coverage&view=list)
[](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=7356&metric=new_duplicated_lines_density&view=list) [0.9% Duplication](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=7356&metric=new_duplicated_lines_density&view=list)
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org