tangled
alpha
login
or
join now
zan.dev
/
core
forked from
tangled.org/core
Monorepo for Tangled — https://tangled.org
0
fork
atom
overview
issues
pulls
pipelines
allow collaborators to close issues
oppi.li
10 months ago
be76b447
48d7106e
+12
-5
2 changed files
expand all
collapse all
unified
split
appview
pages
pages.go
templates
repo
issues
issue.html
+9
-4
appview/pages/pages.go
···
231
231
return slices.Contains(r.Roles, "repo:owner")
232
232
}
233
233
234
234
+
func (r RolesInRepo) IsCollaborator() bool {
235
235
+
return slices.Contains(r.Roles, "repo:collaborator")
236
236
+
}
237
237
+
234
238
func (r RepoInfo) OwnerWithAt() string {
235
239
if r.OwnerHandle != "" {
236
240
return fmt.Sprintf("@%s", r.OwnerHandle)
···
441
445
}
442
446
443
447
type RepoSettingsParams struct {
444
444
-
LoggedInUser *auth.User
445
445
-
RepoInfo RepoInfo
446
446
-
Collaborators []Collaborator
447
447
-
Active string
448
448
+
LoggedInUser *auth.User
449
449
+
RepoInfo RepoInfo
450
450
+
Collaborators []Collaborator
451
451
+
Active string
452
452
+
// TODO: use repoinfo.roles
448
453
IsCollaboratorInviteAllowed bool
449
454
}
450
455
+3
-1
appview/pages/templates/repo/issues/issue.html
···
101
101
</form>
102
102
{{ end }}
103
103
104
104
-
{{ if eq .LoggedInUser.Did .Issue.OwnerDid }}
104
104
+
{{ $isIssueAuthor := eq .LoggedInUser.Did .Issue.OwnerDid }}
105
105
+
{{ $isRepoCollaborator := .RepoInfo.Roles.IsCollaborator }}
106
106
+
{{ if or $isIssueAuthor $isRepoCollaborator }}
105
107
{{ $action := "close" }}
106
108
{{ $icon := "circle-x" }}
107
109
{{ $hoverColor := "red" }}