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 })} + /> + + }