Skip to content

Commit

Permalink
Use "read" value for General Access
Browse files Browse the repository at this point in the history
- Currently the `.Team.AccessMode` is being used when editing a team, if
you want to admin -> General Access, the value of General Access is
"admin" which is incorrect.
- Resolves go-gitea#18483 (First bug mentioned)
  • Loading branch information
Gusted committed Jan 31, 2022
1 parent db7c3ec commit 3492422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/org/team/new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<br>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="permission" value="{{if .PageIsOrgTeamsNew}}read{{else}}{{.Team.AccessMode}}{{end}}" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}>
<input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}>
<label>{{.i18n.Tr "org.teams.general_access"}}</label>
<span class="help">{{.i18n.Tr "org.teams.general_access_helper"}}</span>
</div>
Expand Down

0 comments on commit 3492422

Please sign in to comment.