diff options
author | zeripath <art27@cantab.net> | 2021-12-20 17:18:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-20 17:18:26 +0000 |
commit | 0ac845042e14c85934f02ecef2696e1a8651663e (patch) | |
tree | 798d7a1266f2cf683ba47da7e576620c255222e0 /templates/user | |
parent | ce840bb177fe343c5a366f739a65b9c0efe65c34 (diff) | |
download | gitea-0ac845042e14c85934f02ecef2696e1a8651663e.tar.gz gitea-0ac845042e14c85934f02ecef2696e1a8651663e.zip |
Move POST /{username}/action/{action} to simply POST /{username} (#18045)
The current code unfortunately requires that `action` be a reserved
repository name as it prevents posts to change the settings for
action repositories. However, we can simply change action handler
to work on POST /{username} instead.
Fix #18037
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/profile.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 3bb15449a2..e0a6b39121 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -66,12 +66,12 @@ {{if and .IsSigned (ne .SignedUserName .Owner.Name)}} <li class="follow"> {{if $.IsFollowing}} - <form method="post" action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"> + <form method="post" action="{{.Link}}?action=unfollow&redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.i18n.Tr "user.unfollow"}}</button> </form> {{else}} - <form method="post" action="{{.Link}}/action/follow?redirect_to={{$.Link}}"> + <form method="post" action="{{.Link}}?action=follow&redirect_to={{$.Link}}"> {{$.CsrfTokenHtml}} <button type="submit" class="ui basic green button">{{svg "octicon-person"}} {{.i18n.Tr "user.follow"}}</button> </form> |