Skip to content

[Fix-7857] The user won't be allowed to disable their own account.#7891

Merged
zhuangchong merged 2 commits intoapache:devfrom
calvinjiang:f-edit-user-info
Jan 8, 2022
Merged

[Fix-7857] The user won't be allowed to disable their own account.#7891
zhuangchong merged 2 commits intoapache:devfrom
calvinjiang:f-edit-user-info

Conversation

@calvinjiang
Copy link
Copy Markdown
Contributor

Purpose of the pull request

This PR will close #7857 .

Brief change log

It's risky to disable some users' account by themselves. So rectify the codes not to allow user disable their own account.

Verify this pull request

This change added tests and can be verified as follows:

  • Manually verified the change by testing locally.

image

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 8, 2022

Codecov Report

Merging #7891 (e567ec6) into dev (6532215) will decrease coverage by 0.01%.
The diff coverage is 40.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #7891      +/-   ##
============================================
- Coverage     41.00%   40.98%   -0.02%     
+ Complexity     3696     3694       -2     
============================================
  Files           637      637              
  Lines         27053    27057       +4     
  Branches       3072     3073       +1     
============================================
- Hits          11092    11090       -2     
- Misses        14891    14898       +7     
+ Partials       1070     1069       -1     
Impacted Files Coverage Δ
...inscheduler/api/service/impl/UsersServiceImpl.java 75.67% <0.00%> (-0.48%) ⬇️
.../org/apache/dolphinscheduler/api/enums/Status.java 100.00% <100.00%> (ø)
...org/apache/dolphinscheduler/remote/utils/Host.java 37.77% <0.00%> (-2.23%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 52.11% <0.00%> (-1.41%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6532215...e567ec6. Read the comment docs.

Copy link
Copy Markdown
Contributor

@zhuangchong zhuangchong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user is not allowed to modify the status of his account, then the front-end display status is grayed out, and the back-end is also verified, I think this will have a better experience.

@calvinjiang
Copy link
Copy Markdown
Contributor Author

When editing someone's own user profile, the component of disabling user's state will never show up.
image

image

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

36.4% 36.4% Coverage
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@zhuangchong zhuangchong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@zhuangchong zhuangchong merged commit 24eb40c into apache:dev Jan 8, 2022
@zhuangchong zhuangchong added this to the 2.0.3-release milestone Jan 8, 2022
@caishunfeng caishunfeng removed this from the 2.0.3-release milestone Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Edit User Info] Problems caused by modifying the administrator user information.

4 participants