forked from forgejo/forgejo
Support instance-wide OAuth2 applications (#21335)
Support OAuth2 applications created by admins on the admin panel, they aren't owned by anybody. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
c41b30760b
commit
a902af75f4
7 changed files with 149 additions and 6 deletions
14
templates/admin/applications/list.tmpl
Normal file
14
templates/admin/applications/list.tmpl
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="page-content admin config">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="ui container">
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.locale.Tr "settings.applications"}}
|
||||
</h4>
|
||||
{{template "user/settings/applications_oauth2_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
7
templates/admin/applications/oauth2_edit.tmpl
Normal file
7
templates/admin/applications/oauth2_edit.tmpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="page-content admin config">
|
||||
{{template "admin/navbar" .}}
|
||||
|
||||
{{template "user/settings/applications_oauth2_edit_form" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
|
@ -26,6 +26,11 @@
|
|||
<a class="{{if .PageIsAdminEmails}}active{{end}} item" href="{{AppSubUrl}}/admin/emails">
|
||||
{{.locale.Tr "admin.emails"}}
|
||||
</a>
|
||||
{{if .EnableOAuth2}}
|
||||
<a class="{{if .PageIsAdminApplications}}active{{end}} item" href="{{AppSubUrl}}/admin/applications">
|
||||
{{.locale.Tr "settings.applications"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||
{{.locale.Tr "admin.config"}}
|
||||
</a>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{template "base/alert" .}}
|
||||
<p>
|
||||
<b>{{.locale.Tr "auth.authorize_application_description"}}</b><br/>
|
||||
{{.locale.Tr "auth.authorize_application_created_by" .ApplicationUserLinkHTML | Str2html}}
|
||||
{{.locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML | Str2html}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="ui attached segment">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue