From c48e7f69d1a49623544e9d359defbcee949a32fe Mon Sep 17 00:00:00 2001 From: Justin Stephenson Date: Wed, 1 Sep 2021 12:09:27 -0400 Subject: [PATCH] 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) --- src/config.jsx | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/config.jsx b/src/config.jsx index 3371819..513d342 100644 --- a/src/config.jsx +++ b/src/config.jsx @@ -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; - obj.session_recording.users = this.state.users; - obj.session_recording.groups = this.state.groups; + 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 { /> } + {this.state.scope === "all" && + <> + + this.setState({ exclude_users })} + /> + + + this.setState({ exclude_groups })} + /> + + }