| @@ -687,7 +687,7 @@ func CanDelJob(isSigned bool, user *User, job *CloudbrainInfo) bool { | |||||
| return false | 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 true | ||||
| } | } | ||||
| return false | return false | ||||
| @@ -331,7 +331,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { | |||||
| } | } | ||||
| if opts.TopicName != "" { | if opts.TopicName != "" { | ||||
| var subQueryCond = builder.NewCond() | 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"). | subQuery := builder.Select("repo_topic.repo_id").From("repo_topic"). | ||||
| Join("INNER", "topic", "topic.id = repo_topic.topic_id"). | Join("INNER", "topic", "topic.id = repo_topic.topic_id"). | ||||
| Where(subQueryCond). | Where(subQueryCond). | ||||
| @@ -318,7 +318,11 @@ | |||||
| </div> | </div> | ||||
| <div class="one wide column"> | <div class="one wide column"> | ||||
| <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | |||||
| {{if .User.Name}} | |||||
| <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | |||||
| {{else}} | |||||
| <a title="Ghost"><img class="ui avatar image" src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a> | |||||
| {{end}} | |||||
| </div> | </div> | ||||
| <div class="seven wide column text right"> | <div class="seven wide column text right"> | ||||
| <div class="ui compact buttons"> | <div class="ui compact buttons"> | ||||
| @@ -292,7 +292,11 @@ | |||||
| </div> | </div> | ||||
| <div class="one wide column"> | <div class="one wide column"> | ||||
| {{if .User.Name}} | |||||
| <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | <a href="{{AppSubUrl}}/{{.User.Name}}" title="{{.User.Name}}"><img class="ui avatar image" src="{{.User.RelAvatarLink}}"></a> | ||||
| {{else}} | |||||
| <a title="Ghost"><img class="ui avatar image" src="{{AppSubUrl}}/user/avatar/Ghost/-1"></a> | |||||
| {{end}} | |||||
| </div> | </div> | ||||
| <div class="seven wide column text right"> | <div class="seven wide column text right"> | ||||