diff options
author | Lauris BH <lauris@nix.lv> | 2017-10-15 18:06:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-15 18:06:07 +0300 |
commit | 1ec4dc6c1dec3814d8956bcd1157a51bfe53eb0e (patch) | |
tree | 742d82bceac48af7f5088be3c70bdb6d000728ea /templates/repo/pulls | |
parent | 32ca299650277829b93994eca1508f9d84a5b667 (diff) | |
download | gitea-1ec4dc6c1dec3814d8956bcd1157a51bfe53eb0e.tar.gz gitea-1ec4dc6c1dec3814d8956bcd1157a51bfe53eb0e.zip |
Fix so that user can still fork his own repository to owned organizations (#2699)
* Fix so that user can still fork his own repository to his organizations
* Fix to only use owned organizations
* Add integration test for forking own repository to owned organization
Diffstat (limited to 'templates/repo/pulls')
-rw-r--r-- | templates/repo/pulls/fork.tmpl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl index 133cc92f7c..e9fbfdf2b6 100644 --- a/templates/repo/pulls/fork.tmpl +++ b/templates/repo/pulls/fork.tmpl @@ -19,17 +19,17 @@ </span> <i class="dropdown icon"></i> <div class="menu"> - <div class="item" data-value="{{.SignedUser.ID}}"> - <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}"> - {{.SignedUser.ShortName 20}} - </div> + {{if .CanForkToUser}} + <div class="item" data-value="{{.SignedUser.ID}}"> + <img class="ui mini image" src="{{.SignedUser.RelAvatarLink}}"> + {{.SignedUser.ShortName 20}} + </div> + {{end}} {{range .Orgs}} - {{if and (.IsOwnedBy $.SignedUser.ID) (ne .ID $.ForkFromOwnerID)}} - <div class="item" data-value="{{.ID}}"> - <img class="ui mini image" src="{{.RelAvatarLink}}"> - {{.ShortName 20}} - </div> - {{end}} + <div class="item" data-value="{{.ID}}"> + <img class="ui mini image" src="{{.RelAvatarLink}}"> + {{.ShortName 20}} + </div> {{end}} </div> </div> |