Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing fields #573

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions manager2/src/app/user/user.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h4>Information</h4>
<div class="form-group row" *ngIf="config.enable_ui && config.enable_ui.main_group">
<label for="mgroup" class="col-4 col-form-label">Main group directory</label>
<div class="col-8">
<select id="mgroup" [ngModelOptions]="{standalone: true}" [(ngModel)]="user.group" class="form-control">
<select id="mgroup" [ngModelOptions]="{standalone: true}" [(ngModel)]="user.maingroup" class="form-control">
<option *ngFor="let item of config.main_groups" [value]="item">{{item}}</option>
</select>
</div>
Expand Down Expand Up @@ -359,7 +359,7 @@ <h4>Update password</h4>
aria-label="Toggle password visibility"
role="button"
tabindex="0"
></i>
></i>
<span
*ngIf="isFormValid() && password1Model.dirty && password1.length > 0"
class="input-group-text valid-indicator"
Expand Down Expand Up @@ -396,7 +396,7 @@ <h4>Update password</h4>
</div>
</div>
</div>

<div class="col-sm-8 offset-sm-2 mt-3">
<label for="confirm_password" class="col-form-label">Confirm password</label>
<div class="input-group password-field">
Expand All @@ -422,7 +422,7 @@ <h4>Update password</h4>
aria-label="Toggle password visibility"
role="button"
tabindex="0"
></i>
></i>
<span
*ngIf="password1Model.valid && password2Model.valid && password1 === password2 && password2.length > 0"
class="input-group-text valid-indicator"
Expand All @@ -439,7 +439,7 @@ <h4>Update password</h4>
</div>
</div>
</div>

<button
type="button"
class="p-button p-button-sm p-button-primary mt-3"
Expand All @@ -448,7 +448,7 @@ <h4>Update password</h4>
[ngClass]="{'btn-disabled': !isFormValid() || password1 !== password2}"
>
Change password
</button>
</button>
</form>
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions manager2/src/app/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export class User {
extra_info: any[]
status: string
temp: any
loginShell: string
maingroup: string
uidnumber: number

constructor(
uid: string = '', id: number = 0, first_name: string = '', last_name: string = '',
Expand All @@ -53,7 +56,8 @@ export class User {
group: string = '', secondary_groups: string[] = [], new_group: string = '',
projects: string[] = null, new_project: any = null, tags: any = null,
reg_key: number = 0, api_key: number = 0, ssh: string = '', u2f: any = null, otp: any = null,
history: any[] = [], extra_info: any[] = [], status: string = '', temp: any = null
history: any[] = [], extra_info: any[] = [], status: string = '', temp: any = null, loginShell: string = '',
maingroup: string = "", uidnumber: number = 0
) {
this.uid = uid; this.id = id; this.firstname = first_name; this.lastname = last_name;
this.email = email; this.lab = lab; this.responsible = responsible; this.address = address;
Expand All @@ -65,6 +69,7 @@ export class User {
this.projects = projects; this.newproject = new_project; this.tags = tags;
this.regkey = reg_key; this.apikey = api_key; this.ssh = ssh; this.u2f = u2f; this.otp = otp;
this.history = history; this.extra_info = extra_info; this.status = status; this.temp = temp;
this.loginShell = loginShell; this.maingroup = maingroup; this.uidnumber = uidnumber
}
}

Expand All @@ -90,7 +95,9 @@ export class UserService {
resp.group || '', resp.secondarygroups || [], resp.newgroup || '',
resp.projects || null, resp.newproject || null, resp.tags || null,
resp.regkey || 0, resp.apikey || 0, resp.ssh || '', resp.u2f || null, resp.otp || null,
resp.history || [], resp.extra_info || [], resp.status || '', resp.temp || null
resp.history || [], resp.extra_info || [], resp.status || '', resp.temp || null, resp.loginShell || '',
resp.maingroup || '', resp.uidnumber || 0

);
}

Expand Down