Config: Add SSSD exclude_users and exclude_groups

Add configuration functionality to allow sssd exclude_users, and
exclude_groups configuration options. These options are only
applicable when scope=all. Refer to man sssd-session-recording(5)
This commit is contained in:
Justin Stephenson 2021-09-01 12:09:27 -04:00
parent 2fe72717b2
commit c48e7f69d1

View file

@ -398,6 +398,8 @@ class SssdConfig extends React.Component {
this.state = {
scope: "",
users: "",
exclude_users: "",
exclude_groups: "",
groups: "",
submitting: false,
};
@ -456,8 +458,20 @@ class SssdConfig extends React.Component {
const obj = {};
obj.session_recording = {};
obj.session_recording.scope = this.state.scope;
switch (this.state.scope) {
case "all":
obj.session_recording.exclude_users = this.state.exclude_users;
obj.session_recording.exclude_groups = this.state.exclude_groups;
break;
case "none":
break;
case "some":
obj.session_recording.users = this.state.users;
obj.session_recording.groups = this.state.groups;
break;
default:
break;
}
this.confSave(obj);
e.preventDefault();
}
@ -499,6 +513,23 @@ class SssdConfig extends React.Component {
/>
</FormGroup>
</>}
{this.state.scope === "all" &&
<>
<FormGroup label={_("Exclude Users")}>
<TextInput
id="exclude_users"
value={this.state.exclude_users}
onChange={exclude_users => this.setState({ exclude_users })}
/>
</FormGroup>
<FormGroup label={_("Exclude Groups")}>
<TextInput
id="exclude_groups"
value={this.state.exclude_groups}
onChange={exclude_groups => this.setState({ exclude_groups })}
/>
</FormGroup>
</>}
<ActionGroup>
<Button
id="btn-save-sssd-conf"