Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mis-web): 修复 scow 仅可以提交当前作业的用户来取消作业 #972

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

Miracle575
Copy link
Contributor

@Miracle575 Miracle575 commented Nov 13, 2023

修复 scow 管理系统仅可 以提交当前作业的用户来取消作业,考虑从 scow 做完全的鉴权,不放开适配器权限
slurm adapter 取消作业时会 su userId scancel xxx,所以不能提交执行当前操作的用户 id 来取消作业。
scow 会先校验当前用户的权限,如果具有取消用户作业的权限,则获取提交当前作业的用户,使用该用户 userId 来取消作业

Copy link

changeset-bot bot commented Nov 13, 2023

🦋 Changeset detected

Latest commit: fcbc6e4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@scow/mis-web Patch
@scow/auth Patch
@scow/gateway Patch
@scow/mis-server Patch
@scow/portal-server Patch
@scow/portal-web Patch
@scow/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Miracle575 Miracle575 changed the title fix(web): scow slurm 适配器仅可以提交当前作业的用户id来取消作业 fix(web): scow 仅可以提交当前作业的用户id来取消作业 Nov 13, 2023
@Miracle575 Miracle575 changed the title fix(web): scow 仅可以提交当前作业的用户id来取消作业 fix(web): 修复 scow 仅可以提交当前作业的用户来取消作业 Nov 13, 2023
@Miracle575 Miracle575 changed the title fix(web): 修复 scow 仅可以提交当前作业的用户来取消作业 fix(mis-web): 修复 scow 仅可以提交当前作业的用户来取消作业 Nov 13, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (135f2b1) 68.28% compared to head (fcbc6e4) 68.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #972   +/-   ##
=======================================
  Coverage   68.28%   68.28%           
=======================================
  Files         134      134           
  Lines        3998     3998           
  Branches      535      535           
=======================================
  Hits         2730     2730           
  Misses       1170     1170           
  Partials       98       98           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Miracle575 Miracle575 marked this pull request as ready for review November 13, 2023 02:16
@Miracle575 Miracle575 requested a review from ddadaal November 13, 2023 02:17
@ddadaal ddadaal merged commit 99d01eb into master Nov 13, 2023
15 checks passed
@ddadaal ddadaal deleted the feat-cancel-job branch November 13, 2023 13:40
Miracle575 added a commit that referenced this pull request Jan 12, 2024
修复 scow 管理系统仅可 以提交当前作业的用户来取消作业,考虑从 scow 做完全的鉴权,不放开适配器权限
slurm adapter 取消作业时会 `su userId scancel xxx`,所以不能提交执行当前操作的用户 id 来取消作业。
scow 会先校验当前用户的权限,如果具有取消用户作业的权限,则获取提交当前作业的用户,使用该用户 userId 来取消作业
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.

2 participants