Skip to content

Commit 1849924

Browse files
melegiulsvenseeberg
andcommitted
Fix cli command flag and checkbox listener
Co-authored-by: Sven Seeberg <[email protected]> Co-authored-by: Giuliano Mele <[email protected]>
1 parent 564b59f commit 1849924

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cmd/admin_auth_ldap.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ var (
102102
Name: "team-group-map",
103103
Usage: "Map of LDAP groups to teams.",
104104
},
105-
cli.StringFlag{
106-
Name: "team-group-map-force",
105+
cli.BoolFlag{
106+
Name: "team-group-map-removal",
107107
Usage: "Force synchronization of mapped LDAP groups to teams.",
108108
},
109109
}
@@ -269,6 +269,7 @@ func parseLdapConfig(c *cli.Context, config *ldap.Source) error {
269269
config.SkipLocalTwoFA = c.Bool("skip-local-2fa")
270270
}
271271
if c.IsSet("team-group-map") {
272+
config.TeamGroupMapEnabled = c.Bool("team-group-map")
272273
config.TeamGroupMap = c.String("team-group-map")
273274
}
274275
if c.IsSet("team-group-map-removal") {

web_src/js/features/admin-common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,17 @@ export function initAdminCommon() {
159159
$('#oauth2_provider').on('change', () => onOAuth2Change(true));
160160
$('#oauth2_use_custom_url').on('change', () => onOAuth2UseCustomURLChange(true));
161161
$('#groups_enabled').on('change', onVerifyGroupMembershipChange);
162+
$('#team_group_map_enabled').on('change', onVerifyGroupMembershipChange);
163+
$('#team_group_map_removal').on('change', onVerifyGroupMembershipChange);
162164
}
163165
// Edit authentication
164166
if ($('.admin.edit.authentication').length > 0) {
165167
const authType = $('#auth_type').val();
166168
if (authType === '2' || authType === '5') {
167169
$('#security_protocol').on('change', onSecurityProtocolChange);
168170
$('#groups_enabled').on('change', onVerifyGroupMembershipChange);
171+
$('#team_group_map_enabled').on('change', onVerifyGroupMembershipChange);
172+
$('#team_group_map_removal').on('change', onVerifyGroupMembershipChange);
169173
onVerifyGroupMembershipChange();
170174
if (authType === '2') {
171175
$('#use_paged_search').on('change', onUsePagedSearchChange);

0 commit comments

Comments
 (0)