Skip to content

Commit

Permalink
Merge pull request #209 from stephdl/ForcedShell
Browse files Browse the repository at this point in the history
Hide shell checkbox in case of forced shell NethServer/dev#6029
  • Loading branch information
stephdl committed Jan 23, 2020
2 parents 6bb818f + d728731 commit 327007c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/system-accounts-provider/read
Expand Up @@ -107,6 +107,7 @@ sub getDefaults
my $o = NethServer::SSSD->new(@_);
my $db = esmith::ConfigDB->open_ro();
my $ip = $db->get_prop('nsdc','IpAddress') || '';
my $ShellOverrideStatus = ($db->get_prop('sssd','ShellOverrideStatus') || 'disabled') eq 'enabled' ? JSON::true : JSON::false;

my $dump = {
@_,
Expand All @@ -128,6 +129,7 @@ sub getDefaults
'DiscoverDcType' => $o->{'DiscoverDcType'},
'NsdcIp' => $ip,
'IsLocal' => $o->isLocalProvider(),
'ShellOverride' => $ShellOverrideStatus,
};

return $dump;
Expand Down
4 changes: 3 additions & 1 deletion ui/src/components/system/UsersGroups.vue
Expand Up @@ -542,7 +542,7 @@
/>
</div>
</div>
<div v-if="!newUser.isPassEdit && newUser.advanced" class="form-group">
<div v-if="!newUser.isPassEdit && newUser.advanced && !ShellOverride" class="form-group">
<label class="col-sm-3 control-label" for="shell">
{{$t('users_groups.remote_shell')}}
<doc-info
Expand Down Expand Up @@ -1796,6 +1796,7 @@ export default {
},
data() {
return {
ShellOverride: false,
view: {
isLoaded: false,
isAuth: false,
Expand Down Expand Up @@ -2270,6 +2271,7 @@ export default {
}
if (context.users.provider) {
context.ShellOverride = success.ShellOverride;
context.getUsers();
context.getGroups();
} else {
Expand Down

0 comments on commit 327007c

Please sign in to comment.