This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
wangwei
/
aiforge
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
128
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
增加协作者权限
Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.12.1^2
zouap
3 years ago
parent
638afc1243
commit
3e781ca205
1 changed files
with
5 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-1
routers/repo/ai_model_manage.go
+ 5
- 1
routers/repo/ai_model_manage.go
View File
@@ -998,7 +998,11 @@ func isCanDownload(ctx *context.Context, task *models.AiModelManage) bool {
if ctx.User == nil {
return false
}
if ctx.User.IsAdmin || ctx.User.ID == task.UserId || ctx.Repo.HasAccess() {
isCollaborator, err := ctx.Repo.Repository.IsCollaborator(ctx.User.ID)
if err != nil {
log.Info("query error.")
}
if ctx.User.IsAdmin || ctx.User.ID == task.UserId || isCollaborator {
return true
}
if !task.IsPrivate {
Write
Preview
Loading…
Cancel
Save