From 678d4f0ad4db343da0b1b4bce4095c0e97ee1317 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Fri, 15 Oct 2021 18:56:59 +0800 Subject: [PATCH 1/4] set default avatar --- templates/repo/cloudbrain/index.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 0626f57c6..31e1d6ab6 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -318,7 +318,12 @@
- + {{if .User.Name}} + + {{else}} + + {{end}} +
From 167823e52cd340e3f078f33d3465a2ef0bdd7656 Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Fri, 15 Oct 2021 19:13:20 +0800 Subject: [PATCH 2/4] 1 --- models/cloudbrain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/cloudbrain.go b/models/cloudbrain.go index c26f8a2b6..4b2bec8e6 100755 --- a/models/cloudbrain.go +++ b/models/cloudbrain.go @@ -687,7 +687,7 @@ func CanDelJob(isSigned bool, user *User, job *CloudbrainInfo) bool { return false } - if user.ID == job.UserID || user.IsAdmin || permission.AccessMode >= AccessModeAdmin { + if (user.ID == job.UserID && permission.AccessMode >= AccessModeWrite) || user.IsAdmin || permission.AccessMode >= AccessModeAdmin { return true } return false From 84e1b39ea8a39960d2408037a6e07d6e4704a86e Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Fri, 15 Oct 2021 19:25:26 +0800 Subject: [PATCH 3/4] modelarts --- templates/repo/cloudbrain/index.tmpl | 1 - templates/repo/modelarts/index.tmpl | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/repo/cloudbrain/index.tmpl b/templates/repo/cloudbrain/index.tmpl index 31e1d6ab6..3af96998c 100755 --- a/templates/repo/cloudbrain/index.tmpl +++ b/templates/repo/cloudbrain/index.tmpl @@ -323,7 +323,6 @@ {{else}} {{end}} -
diff --git a/templates/repo/modelarts/index.tmpl b/templates/repo/modelarts/index.tmpl index f09b7a36e..7820cb109 100755 --- a/templates/repo/modelarts/index.tmpl +++ b/templates/repo/modelarts/index.tmpl @@ -292,7 +292,11 @@
+ {{if .User.Name}} + {{else}} + + {{end}}
From 1383bfca7cf1d8b1dce73b73f46f4451ad987424 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 18 Oct 2021 16:22:44 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=8C=89=E9=A2=86=E5=9F=9F=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=8C=89=E5=B0=8F=E5=86=99=E5=AD=97=E6=AF=8D=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/repo_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo_list.go b/models/repo_list.go index 928e1f953..c4d8ee823 100755 --- a/models/repo_list.go +++ b/models/repo_list.go @@ -331,7 +331,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { } if opts.TopicName != "" { var subQueryCond = builder.NewCond() - subQueryCond = subQueryCond.Or(builder.Eq{"topic.name": opts.TopicName}) + subQueryCond = subQueryCond.Or(builder.Eq{"topic.name": strings.ToLower(opts.TopicName)}) subQuery := builder.Select("repo_topic.repo_id").From("repo_topic"). Join("INNER", "topic", "topic.id = repo_topic.topic_id"). Where(subQueryCond).