diff options
author | qwerty287 <80460567+qwerty287@users.noreply.github.com> | 2022-10-12 16:08:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 22:08:29 +0800 |
commit | a902af75f480a5629f0747cd65531107e4897e4e (patch) | |
tree | 4141c007aad7bd0a434643a7c7f465c7302c85f0 /templates/admin | |
parent | c41b30760ba223b8e1db58b1412aacb5e2571b8a (diff) | |
download | gitea-a902af75f480a5629f0747cd65531107e4897e4e.tar.gz gitea-a902af75f480a5629f0747cd65531107e4897e4e.zip |
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>
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/applications/list.tmpl | 14 | ||||
-rw-r--r-- | templates/admin/applications/oauth2_edit.tmpl | 7 | ||||
-rw-r--r-- | templates/admin/navbar.tmpl | 5 |
3 files changed, 26 insertions, 0 deletions
diff --git a/templates/admin/applications/list.tmpl b/templates/admin/applications/list.tmpl new file mode 100644 index 0000000000..6d627129df --- /dev/null +++ b/templates/admin/applications/list.tmpl @@ -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" .}} diff --git a/templates/admin/applications/oauth2_edit.tmpl b/templates/admin/applications/oauth2_edit.tmpl new file mode 100644 index 0000000000..84d821ecca --- /dev/null +++ b/templates/admin/applications/oauth2_edit.tmpl @@ -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" .}} diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index 0db1aab079..b138eb79ba 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -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> |