diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-09-10 10:30:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 16:30:07 +0100 |
commit | c3e8c9441ad0e90bb0567af0bf7e9444aa8f4ad5 (patch) | |
tree | 96c8e00c1ff4b09f616df5805af6a3db11196fda /templates/admin/auth/edit.tmpl | |
parent | 4c42fce40175b735a689289bf61ca65a8e2266b2 (diff) | |
download | gitea-c3e8c9441ad0e90bb0567af0bf7e9444aa8f4ad5.tar.gz gitea-c3e8c9441ad0e90bb0567af0bf7e9444aa8f4ad5.zip |
Add check for LDAP group membership (#10869)
This is a port of gogs/gogs#4398
The only changes made by myself are:
Add locales
Add some JS to the UI
Otherwise all code credit goes to @aboron
Resolves #10829
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/admin/auth/edit.tmpl')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 15ab2b227b..e6c5cf2578 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -99,6 +99,31 @@ <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey"> </div> + <div class="inline field"> + <div class="ui checkbox"> + <label for="groups_enabled"><strong>{{.i18n.Tr "admin.auths.verify_group_membership"}}</strong></label> + <input id="groups_enabled" name="groups_enabled" type="checkbox" {{if $cfg.GroupsEnabled}}checked{{end}}> + </div> + </div> + <div id="groups_enabled_change"> + <div class="field"> + <label for="group_dn">{{.i18n.Tr "admin.auths.group_search_base"}}</label> + <input id="group_dn" name="group_dn" value="{{$cfg.GroupDN}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> + </div> + <div class="field"> + <label for="group_filter">{{.i18n.Tr "admin.auths.valid_groups_filter"}}</label> + <input id="group_filter" name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> + </div> + <div class="field"> + <label for="group_member_uid">{{.i18n.Tr "admin.auths.group_attribute_list_users"}}</label> + <input id="group_member_uid" name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="e.g. memberUid"> + </div> + <div class="field"> + <label for="user_uid">{{.i18n.Tr "admin.auths.user_attribute_in_group"}}</label> + <input id="user_uid" name="user_uid" value="{{$cfg.UserUID}}" placeholder="e.g. uid"> + </div> + <br/> + </div> {{if .Source.IsLDAP}} <div class="inline field"> <div class="ui checkbox"> |