aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-08-16 21:27:08 +0100
committerGitHub <noreply@github.com>2020-08-16 16:27:08 -0400
commitd1e67d7adefeff79c9aa5128c09eb53bd6e473a9 (patch)
treeadbc4f54953bc2f50802638efcd14e8e3d4be1fa /templates/user
parentf50364a5b04cd42587d09075c3787b3f2486db19 (diff)
downloadgitea-d1e67d7adefeff79c9aa5128c09eb53bd6e473a9.tar.gz
gitea-d1e67d7adefeff79c9aa5128c09eb53bd6e473a9.zip
Fix bug preventing transfer to private organization (#12497)
* Fix bug preventing transfer to private organization The code assessing whether a private organization was visible to a user before allowing transfer was incorrect due to testing membership the wrong way round This PR fixes this issue and renames the function performing the test to be clearer. Further looking at the API for transfer repository - no testing was performed to ensure that the acting user could actually see the new owning organization. Signed-off-by: Andrew Thornton <art27@cantab.net> * change IsUserPartOfOrg everywhere
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/profile.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index bc2960b3b9..f453898f94 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -52,7 +52,7 @@
<li>
<ul class="user-orgs">
{{range .Orgs}}
- {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
+ {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
<li>
<a href="{{.HomeLink}}"><img class="ui image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
</li>