You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "VampireAchao (via GitHub)" <gi...@apache.org> on 2023/05/07 15:49:51 UTC

[GitHub] [incubator-streampark] VampireAchao opened a new pull request, #2734: remove delete user function and add transfer resource of user function

VampireAchao opened a new pull request, #2734:
URL: https://github.com/apache/incubator-streampark/pull/2734

   <!--
   Thank you for contributing to StreamPark! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   ## Contribution Checklist
   
     - If this is your first time, please read our contributor guidelines: [Submit Code](https://streampark.apache.org/community/submit_guide/submit_code).
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-streampark/issues).
   
     - Name the pull request in the form "[Feature] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
   
     - If the PR is unfinished, add `[WIP]` in your PR title, e.g., `[WIP][Feature] Title of the pull request`.
   
   -->
   
   ## What changes were proposed in this pull request
   
   Issue Number: close #2712 <!-- REMOVE this line if no issue to close -->
   
   ## Brief change log
   
   1. Requirement:
   
   - The administrator cancels the user deletion function and replaces it with disabling users.
   
   2. Detailed logic:
   
   - The administrator cancels the user deletion function.
   - When the user account is disabled, it cannot own resources (application and project ownership)
   - Add resource transfer function to transfer disabled user resources to new users
   
   
   ## Verifying this change
   
   Change the user's status when the user has resources.
   
   This change is already covered by existing tests, such as *UserServiceTest*.
   
   This change added tests and can be verified as follows:
   
   1. testLockUser in UserServiceTest
   - This unit test covers different scenarios for locking and unlocking a user when they have no resources, as well as locking a user when they have resources and checking the different return results.
   3. testTransferResource in UserServiceTest
   - This unit test involves transferring a user's resources to another person.
   
   
   ## Does this pull request potentially affect one of the following parts
    - Dependencies (does it add or upgrade a dependency): (yes / no)
    no
   


-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] VampireAchao commented on pull request #2734: remove delete user function and add transfer resource of user function

Posted by "VampireAchao (via GitHub)" <gi...@apache.org>.
VampireAchao commented on PR #2734:
URL: https://github.com/apache/incubator-streampark/pull/2734#issuecomment-1537705828

   I will modify the modal


-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys merged pull request #2734: remove delete user function and add transfer resource of user function

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys merged PR #2734:
URL: https://github.com/apache/incubator-streampark/pull/2734


-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2734: remove delete user function and add transfer resource of user function

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2734:
URL: https://github.com/apache/incubator-streampark/pull/2734#discussion_r1186975437


##########
streampark-console/streampark-console-webapp/src/views/system/user/components/UserDrawer.vue:
##########
@@ -28,24 +28,45 @@
     </template>
     <BasicForm @register="registerForm" />
   </BasicDrawer>
+  <Modal
+    :visible="transferModalVisible"
+    :confirm-loading="transferModalLoading"
+    :ok-text="t('common.okText')"
+    centered
+    @ok="handleTransfer"
+    @cancel="transferModalVisible=false"
+  >
+    <template #title>
+      <SvgIcon name="alarm" size="25"/>

Review Comment:
   It is recommended change icon to  `<Icon icon="ant-design:swap-outlined" />`



-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] wolfboys commented on a diff in pull request #2734: remove delete user function and add transfer resource of user function

Posted by "wolfboys (via GitHub)" <gi...@apache.org>.
wolfboys commented on code in PR #2734:
URL: https://github.com/apache/incubator-streampark/pull/2734#discussion_r1186973246


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/ApplicationService.java:
##########
@@ -120,4 +122,6 @@ List<Application> getByTeamIdAndExecutionModes(
   List<String> historyUploadJars();
 
   String k8sStartLog(Long id, Integer offset, Integer limit) throws Exception;
+
+  void changeUser(Long userId, Long targetUserId);

Review Comment:
   It is recommended to change the method name to `changeOwnership`



-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] VampireAchao commented on a diff in pull request #2734: remove delete user function and add transfer resource of user function

Posted by "VampireAchao (via GitHub)" <gi...@apache.org>.
VampireAchao commented on code in PR #2734:
URL: https://github.com/apache/incubator-streampark/pull/2734#discussion_r1186977329


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/ApplicationService.java:
##########
@@ -120,4 +122,6 @@ List<Application> getByTeamIdAndExecutionModes(
   List<String> historyUploadJars();
 
   String k8sStartLog(Long id, Integer offset, Integer limit) throws Exception;
+
+  void changeUser(Long userId, Long targetUserId);

Review Comment:
   okay



-- 
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: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org