diff options
author | aboron <aboron@users.noreply.github.com> | 2017-05-29 22:33:50 -0400 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2017-05-29 22:33:50 -0400 |
commit | dbb7e5464b6a9cad430b2f36b52e7674211f51cf (patch) | |
tree | 8f201849432a65d3a58e04ef2c92b7eedfbf7a24 /templates/admin | |
parent | 11ad64f6cbdc489a49247604fe697dffaa090ac2 (diff) |
ldap: add check for group membership (#4398)
* Add standard LDAP group membership checking.
* Fix formatting, typo, grammer, and syntax errors
* Debugging done.
Gave up on locale file edits.
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 22 | ||||
-rw-r--r-- | templates/admin/auth/new.tmpl | 22 |
2 files changed, 44 insertions, 0 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index b06cee8b..0026a4a9 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -92,6 +92,28 @@ <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label> <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required> </div> + <div class="inline field"> + <div class="ui checkbox"> + <label><strong>Verify group membership in LDAP</strong></label> + <input name="groups_enabled" type="checkbox" {{if $cfg.GroupsEnabled}}checked{{end}}> + </div> + </div> + <div class="field"> + <label for="group_dn">Group search Base DN</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">Valid groups filter</label> + <input id="group_filter" name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="e.g. (|(cn=gogs_users)(cn=admins))"> + </div> + <div class="field"> + <label for="group_member_uid">Group attribute containing list of 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">User attribute listed in group</label> + <input id="user_uid" name="user_uid" value="{{$cfg.UserUID}}" placeholder="e.g. uid"> + </div> {{if .Source.IsLDAP}} <div class="inline field"> <div class="ui checkbox"> diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index db59856f..1707cd87 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -95,6 +95,28 @@ <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label> <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail"> </div> + <div class="inline field"> + <div class="ui checkbox"> + <label><strong>Verify group membership in LDAP</strong></label> + <input name="groups_enabled" type="checkbox"> + </div> + </div> + <div class="field"> + <label for="group_dn">Group search Base DN</label> + <input id="group_dn" name="group_dn" placeholder="e.g. ou=group,dc=mydomain,dc=com"> + </div> + <div class="field"> + <label for="group_filter">Valid groups filter</label> + <input id="group_filter" name="group_filter" placeholder="e.g. (|(cn=gogs_users)(cn=admins))"> + </div> + <div class="field"> + <label for="group_member_uid">Group attribute containing list of users</label> + <input id="group_member_uid" name="group_member_uid" placeholder="e.g. memberUid"> + </div> + <div class="field"> + <label for="user_uid">User attribute listed in group</label> + <input id="user_uid" name="user_uid" placeholder="e.g. uid"> + </div> </div> <!-- SMTP --> |