gitea

Development moved to Codeberg

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
  36. 36
  37. 37
  38. 38
  39. 39
  40. 40
  41. 41
  42. 42
  43. 43
  44. 44
  45. 45
  46. 46
  47. 47
  48. 48
  49. 49
  50. 50
  51. 51
  52. 52
  53. 53
  54. 54
  55. 55
  56. 56
  57. 57
  58. 58
  59. 59
  60. 60
  61. 61
  62. 62
  63. 63
  64. 64
  65. 65
  66. 66
  67. 67
  68. 68
  69. 69
  70. 70
  71. 71
  72. 72
  73. 73
  74. 74
  75. 75
  76. 76
  77. 77
  78. 78
  79. 79
  80. 80
  81. 81
  82. 82
  83. 83
  84. 84
  85. 85
  86. 86
  87. 87
  88. 88
  89. 89
  90. 90
  91. 91
  92. 92
  93. 93
  94. 94
  95. 95
  96. 96
  97. 97
  98. 98
  99. 99
  100. 100
  101. 101
  102. 102
  103. 103
  104. 104
  105. 105
  106. 106
  107. 107
  108. 108
  109. 109
<div class="oauth2 field {{if not (eq .type 6)}}gt-hidden{{end}}">
	<div class="inline required field">
		<label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label>
		<div class="ui selection type dropdown">
			<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
			<div class="text">{{.oauth2_provider}}</div>
			{{svg "octicon-triangle-down" 14 "dropdown icon"}}
			<div class="menu">
				{{range .OAuth2Providers}}
					<div class="item" data-value="{{.Name}}">{{.DisplayName}}</div>
				{{end}}
			</div>
		</div>
	</div>
	<div class="required field">
		<label for="oauth2_key">{{.locale.Tr "admin.auths.oauth2_clientID"}}</label>
		<input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}">
	</div>
	<div class="required field">
		<label for="oauth2_secret">{{.locale.Tr "admin.auths.oauth2_clientSecret"}}</label>
		<input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}">
	</div>
	<div class="optional field">
		<label for="oauth2_icon_url">{{.locale.Tr "admin.auths.oauth2_icon_url"}}</label>
		<input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}">
	</div>
	<div class="open_id_connect_auto_discovery_url required field{{if .Err_DiscoveryURL}} error{{end}}">
		<label for="open_id_connect_auto_discovery_url">{{.locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label>
		<input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}">
	</div>
	<div class="optional field">
		<div class="ui checkbox">
			<label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label>
			<input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}>
			<p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p>
		</div>
	</div>

	<div class="oauth2_use_custom_url inline field">
		<div class="ui checkbox">
			<label><strong>{{.locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label>
			<input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox">
		</div>
	</div>
	<div class="oauth2_use_custom_url_field oauth2_auth_url required field">
		<label for="oauth2_auth_url">{{.locale.Tr "admin.auths.oauth2_authURL"}}</label>
		<input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}">
	</div>
	<div class="oauth2_use_custom_url_field oauth2_token_url required field">
		<label for="oauth2_token_url">{{.locale.Tr "admin.auths.oauth2_tokenURL"}}</label>
		<input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}">
	</div>
	<div class="oauth2_use_custom_url_field oauth2_profile_url required field">
		<label for="oauth2_profile_url">{{.locale.Tr "admin.auths.oauth2_profileURL"}}</label>
		<input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}">
	</div>
	<div class="oauth2_use_custom_url_field oauth2_email_url required field">
		<label for="oauth2_email_url">{{.locale.Tr "admin.auths.oauth2_emailURL"}}</label>
		<input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}">
	</div>
	<div class="oauth2_use_custom_url_field oauth2_tenant required field">
		<label for="oauth2_tenant">{{.locale.Tr "admin.auths.oauth2_tenant"}}</label>
		<input id="oauth2_tenant" name="oauth2_tenant" value="{{.oauth2_tenant}}">
	</div>

	{{range .OAuth2Providers}}{{if .CustomURLSettings}}
		<input id="{{.Name}}_customURLSettings" type="hidden" data-required="{{.CustomURLSettings.Required}}" data-available="true">
		<input id="{{.Name}}_token_url" value="{{.CustomURLSettings.TokenURL.Value}}" data-available="{{.CustomURLSettings.TokenURL.Available}}" data-required="{{.CustomURLSettings.TokenURL.Required}}" type="hidden" />
		<input id="{{.Name}}_auth_url" value="{{.CustomURLSettings.AuthURL.Value}}" data-available="{{.CustomURLSettings.AuthURL.Available}}" data-required="{{.CustomURLSettings.AuthURL.Required}}" type="hidden" />
		<input id="{{.Name}}_profile_url" value="{{.CustomURLSettings.ProfileURL.Value}}" data-available="{{.CustomURLSettings.ProfileURL.Available}}" data-required="{{.CustomURLSettings.ProfileURL.Required}}" type="hidden" />
		<input id="{{.Name}}_email_url" value="{{.CustomURLSettings.EmailURL.Value}}" data-available="{{.CustomURLSettings.EmailURL.Available}}" data-required="{{.CustomURLSettings.EmailURL.Required}}" type="hidden" />
		<input id="{{.Name}}_tenant" value="{{.CustomURLSettings.Tenant.Value}}" data-available="{{.CustomURLSettings.Tenant.Available}}" data-required="{{.CustomURLSettings.Tenant.Required}}" type="hidden" />
	{{end}}{{end}}

	<div class="field">
		<label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label>
		<input id="oauth2_scopes" name="oauth2_scopes" values="{{.oauth2_scopes}}">
	</div>
	<div class="field">
		<label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label>
		<input id="oauth2_required_claim_name" name="oauth2_required_claim_name" values="{{.oauth2_required_claim_name}}">
		<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p>
	</div>
	<div class="field">
		<label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label>
		<input id="oauth2_required_claim_value" name="oauth2_required_claim_value" values="{{.oauth2_required_claim_value}}">
		<p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p>
	</div>
	<div class="field">
		<label for="oauth2_group_claim_name">{{.locale.Tr "admin.auths.oauth2_group_claim_name"}}</label>
		<input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{.oauth2_group_claim_name}}">
	</div>
	<div class="field">
		<label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label>
		<input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_group_claim_name}}">
	</div>
	<div class="field">
		<label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label>
		<input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_group_claim_name}}">
	</div>
	<div class="field">
		<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team"}}</label>
		<input name="oauth2_group_team_map" value="{{.group_team_map}}" placeholder='e.g. {"Developer": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'>
	</div>
	<div class="ui checkbox">
		<label>{{.locale.Tr "admin.auths.oauth2_map_group_to_team_removal"}}</label>
		<input name="oauth2_group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}>
	</div>
</div>