]> source.dussan.org Git - gitea.git/commitdiff
Repository teams - disable remove button when have access to all (#9640)
authorDavid Svantesson <davidsvantesson@gmail.com>
Wed, 8 Jan 2020 00:36:39 +0000 (01:36 +0100)
committerLunny Xiao <xiaolunwen@gmail.com>
Wed, 8 Jan 2020 00:36:39 +0000 (08:36 +0800)
Co-authored-by: zeripath <art27@cantab.net>
templates/repo/settings/collaboration.tmpl

index c0b444dce3da5e556e8da420674fa5c0da6df521..f6234f94a0074b9ce6bfda86114faf5cfdfa8589 100644 (file)
@@ -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>