Allow users to set login shell in profile
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -77,6 +77,20 @@ const template = `
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h4 style="margin-left: 15px">{{ t['profile.advanced_header'] }}</h4>
|
||||
<div class="col-12 form-group">
|
||||
<label for="coreid-profile-shell-input">{{ t['profile.advanced_shell'] }}</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="coreid-profile-shell-input"
|
||||
v-model="profile_shell"
|
||||
@keyup="on_key_up($event)"
|
||||
placeholder="/bin/bash"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="list-group-item text-right font-italic text-muted">
|
||||
{{ form_message }}
|
||||
@@ -202,6 +216,7 @@ export default class EditProfileComponent extends Component {
|
||||
this.profile_last = ''
|
||||
this.profile_email = ''
|
||||
this.profile_tagline = ''
|
||||
this.profile_shell = ''
|
||||
this.last_reset = ''
|
||||
this.mfa_enable_date = ''
|
||||
|
||||
@@ -271,7 +286,9 @@ export default class EditProfileComponent extends Component {
|
||||
'profile.app_key',
|
||||
'profile.example_gateway_url',
|
||||
'profile.save_notify',
|
||||
'profile.test_notify'
|
||||
'profile.test_notify',
|
||||
'profile.advanced_header',
|
||||
'profile.advanced_shell'
|
||||
)
|
||||
|
||||
this.app_name = session.get('app.name')
|
||||
@@ -292,6 +309,7 @@ export default class EditProfileComponent extends Component {
|
||||
last_name: this.profile_last,
|
||||
email: this.profile_email,
|
||||
tagline: this.profile_tagline,
|
||||
login_shell: this.profile_shell,
|
||||
user_id: this.user_id || 'me',
|
||||
}
|
||||
}
|
||||
@@ -340,6 +358,7 @@ export default class EditProfileComponent extends Component {
|
||||
this.profile_last = result.last_name
|
||||
this.profile_email = result.email
|
||||
this.profile_tagline = result.tagline
|
||||
this.profile_shell = result.login_shell
|
||||
|
||||
const notify_config = await profile_service.get_notify(this.user_id || 'me')
|
||||
if ( !notify_config || !notify_config.has_config ) {
|
||||
|
||||
@@ -10,8 +10,8 @@ class ProfileService {
|
||||
if ( results && results.data && results.data.data ) return results.data.data
|
||||
}
|
||||
|
||||
async update_profile({ user_id, first_name, last_name, email, tagline = undefined }) {
|
||||
await axios.patch(`/api/v1/profile/${user_id}`, { first_name, last_name, email, tagline })
|
||||
async update_profile({ user_id, first_name, last_name, email, login_shell = undefined, tagline = undefined }) {
|
||||
await axios.patch(`/api/v1/profile/${user_id}`, { first_name, last_name, email, tagline, login_shell })
|
||||
}
|
||||
|
||||
async update_notify({ user_id = 'me', app_key, gateway_url }) {
|
||||
|
||||
Reference in New Issue
Block a user