diff options
author | Peter Smit <peter@smitmail.eu> | 2015-02-16 12:51:56 +0200 |
---|---|---|
committer | Peter Smit <peter@smitmail.eu> | 2015-02-16 12:51:56 +0200 |
commit | ed89b39984a9191380263eaf357c3a9c71770674 (patch) | |
tree | 8fd13622efaef4ae4766634b1c210fbf20727e5d /templates | |
parent | cd6a2b78a752605d808c6392ce78b92d4759fede (diff) | |
download | gitea-ed89b39984a9191380263eaf357c3a9c71770674.tar.gz gitea-ed89b39984a9191380263eaf357c3a9c71770674.zip |
Updating context and fixing permission issues
The boolean flags in the repo context have been replaced with mode and two methods
Also, the permissions have been brought more in line with https://help.github.com/articles/permission-levels-for-an-organization-repository/ , Admin Team members are able to change settings of their repositories.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/header.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/sidebar.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/toolbar.tmpl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index a0b927be60..21f9cea882 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -49,7 +49,7 @@ </a> </li> <li id="repo-header-fork"> - <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryTrueOwner) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork?fork_id={{.Id}}"{{end}}> + <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork?fork_id={{.Id}}"{{end}}> <button class="btn btn-gray text-bold btn-radius"> <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}} <span class="num">{{.NumForks}}</span> diff --git a/templates/repo/sidebar.tmpl b/templates/repo/sidebar.tmpl index 9d6abb47bc..1609603821 100644 --- a/templates/repo/sidebar.tmpl +++ b/templates/repo/sidebar.tmpl @@ -20,7 +20,7 @@ <!-- <li> <a class="radius" href="#"><i class="octicon octicon-organization"></i>contributors <span class="num right label label-gray label-radius">43</span></a> </li> --> - {{if .IsRepositoryTrueOwner}} + {{if .IsRepositoryAdmin}} <li class="border-bottom"></li> <li> <a class="radius" href="{{.RepoLink}}/settings"><i class="octicon octicon-tools"></i>{{.i18n.Tr "repo.settings"}}</a> diff --git a/templates/repo/toolbar.tmpl b/templates/repo/toolbar.tmpl index 6357b3c4c0..f2254d21dd 100644 --- a/templates/repo/toolbar.tmpl +++ b/templates/repo/toolbar.tmpl @@ -35,7 +35,7 @@ <li><a href="#">Pulse</a></li> <li><a href="#">Network</a></li> </ul> - </li> -->{{end}}{{if .IsRepositoryTrueOwner}} + </li> -->{{end}}{{if .IsRepositoryAdmin}} <li class="{{if .IsRepoToolbarSetting}}active{{end}}"><a href="{{.RepoLink}}/settings">Settings</a> </li>{{end}} </ul> |