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

feat: support general users view and cancel own tasks #7416

Merged
merged 2 commits into from
Nov 1, 2024

Conversation

KirCute
Copy link
Contributor

@KirCute KirCute commented Oct 26, 2024

Add a creator attribute to the upload, copy and offline download tasks, so that a GENERAL task creator can view and cancel them.

BREAKING CHANGE:

  1. A new internal package task including the struct TaskWithCreator which embeds tache.Base is created, and the past dependence on tache.Task will all be transferred to dependence on this package.
  2. The API /admin/task can now also be accessed via /task, and the old endpoint is retained to ensure compatibility with legacy automation scripts.

Closes #7398

Add a creator attribute to the upload, copy and offline download
tasks, so that a GENERAL task creator can view and cancel them.

BREAKING CHANGE:

1. A new internal package `task` including the struct `TaskWithCreator`
   which embeds `tache.Base` is created, and the past dependence on
   `tache.Task` will all be transferred to dependence on this package.
2. The API `/admin/task` can now also be accessed via `/task`, and the
   old endpoint is retained to ensure compatibility with legacy
   automation scripts.

Closes #7398
@KirCute
Copy link
Contributor Author

KirCute commented Oct 26, 2024

这个修改还有一个前端部分AlistGo/alist-web/#201

@xhofe xhofe merged commit 64ceb5a into AlistGo:main Nov 1, 2024
3 checks passed
@anwen-anyi
Copy link
Contributor

手动取消后的状态好像不对 是和前端有关系吗~ (下面的都是手动取消的 分别有网盘和本地,有管理员账户和普通账户)
image

@KirCute
Copy link
Contributor Author

KirCute commented Nov 2, 2024

手动取消后的状态好像不对 是和前端有关系吗~ (下面的都是手动取消的 分别有网盘和本地,有管理员账户和普通账户) image

不清楚,你看看调试窗口里面后端返回的状态正确吗,我之前在本地用复制测的时候没有这个问题

@anwen-anyi
Copy link
Contributor

手动取消后的状态好像不对 是和前端有关系吗~ (下面的都是手动取消的 分别有网盘和本地,有管理员账户和普通账户) image

不清楚,你看看调试窗口里面后端返回的状态正确吗,我之前在本地用复制测的时候没有这个问题

晚点我试试,这个是离线下载的状态,复制暂时还没测试

@KirCute
Copy link
Contributor Author

KirCute commented Nov 2, 2024

手动取消后的状态好像不对 是和前端有关系吗~ (下面的都是手动取消的 分别有网盘和本地,有管理员账户和普通账户) image

不清楚,你看看调试窗口里面后端返回的状态正确吗,我之前在本地用复制测的时候没有这个问题

晚点我试试,这个是离线下载的状态,复制暂时还没测试

我刚刚试了一下,离线下载任务取消后会显示成功这个问题 3.37.4 也有,好像并不是这个版本才有的 bug

xrgzs pushed a commit to xrgzs/alist that referenced this pull request Nov 16, 2024
…lose AlistGo#7398)

* feat: support general users view and cancel own tasks

Add a creator attribute to the upload, copy and offline download
tasks, so that a GENERAL task creator can view and cancel them.

BREAKING CHANGE:

1. A new internal package `task` including the struct `TaskWithCreator`
   which embeds `tache.Base` is created, and the past dependence on
   `tache.Task` will all be transferred to dependence on this package.
2. The API `/admin/task` can now also be accessed via `/task`, and the
   old endpoint is retained to ensure compatibility with legacy
   automation scripts.

Closes AlistGo#7398

* fix(deps): update github.com/xhofe/tache to v0.1.3
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.

希望增加允许general用户管理由自己创建的任务的功能
3 participants