Skip to content

Commit

Permalink
Repository teams - disable remove button when have access to all (#9640)
Browse files Browse the repository at this point in the history
Co-authored-by: zeripath <art27@cantab.net>
  • Loading branch information
2 people authored and lunny committed Jan 8, 2020
1 parent 1e9b3d4 commit c181070
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions templates/repo/settings/collaboration.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@
{{end}}
</div>
{{if $allowedToChangeTeams}}
{{ $globalRepoAccess := (eq .LowerName "owners") }}
<div class="ui two wide column {{if $globalRepoAccess}}poping up{{end}}" {{if $globalRepoAccess}}data-content="This team has access to all repositories and can't be removed."{{end}}>
<button class="ui red tiny button inline text-thin delete-button {{if $globalRepoAccess}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}">
<div class="ui two wide column {{if .IncludesAllRepositories}}poping up{{end}}" {{if .IncludesAllRepositories}}data-content="This team has access to all repositories and can't be removed."{{end}}>
<button class="ui red tiny button inline text-thin delete-button {{if .IncludesAllRepositories}}disabled{{end}}" data-url="{{$.Link}}/team/delete" data-id="{{.ID}}">
{{$.i18n.Tr "repo.settings.delete_collaborator"}}
</button>
</div>
Expand Down

0 comments on commit c181070

Please sign in to comment.