remove isAdministration
This commit is contained in:
parent
328c78bc4a
commit
a3342ce250
|
@ -164,9 +164,7 @@
|
||||||
"webpack-cli": "^3.0.8",
|
"webpack-cli": "^3.0.8",
|
||||||
"webtorrent": "https://github.com/webtorrent/webtorrent#e9b209c7970816fc29e0cc871157a4918d66001d",
|
"webtorrent": "https://github.com/webtorrent/webtorrent#e9b209c7970816fc29e0cc871157a4918d66001d",
|
||||||
"whatwg-fetch": "^3.0.0",
|
"whatwg-fetch": "^3.0.0",
|
||||||
"zone.js": "~0.8.5"
|
"zone.js": "~0.8.5",
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"generate-password-browser": "^1.0.2"
|
"generate-password-browser": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,12 +82,10 @@
|
||||||
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
<input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div *ngIf="isAdministration">
|
|
||||||
<div class="account-title" i18n>Danger Zone</div>
|
<div class="account-title" i18n>Danger Zone</div>
|
||||||
|
|
||||||
<p i18n>Send a link to reset the password by mail to the user.</p>
|
<p i18n>Send a link to reset the password by mail to the user.</p>
|
||||||
<button (click)="resetPassword()" i18n>Ask for new password</button>
|
<button (click)="resetPassword()" i18n>Ask for new password</button>
|
||||||
|
|
||||||
<p class="mt-4" i18n>Manually set the user password</p>
|
<p class="mt-4" i18n>Manually set the user password</p>
|
||||||
<my-user-password></my-user-password>
|
<my-user-password></my-user-password>
|
||||||
</div>
|
|
||||||
|
|
|
@ -21,10 +21,8 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy {
|
||||||
userId: number
|
userId: number
|
||||||
userEmail: string
|
userEmail: string
|
||||||
username: string
|
username: string
|
||||||
isAdministration = false
|
|
||||||
|
|
||||||
private paramsSub: Subscription
|
private paramsSub: Subscription
|
||||||
private isAdministrationSub: Subscription
|
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
protected formValidatorService: FormValidatorService,
|
protected formValidatorService: FormValidatorService,
|
||||||
|
@ -59,15 +57,10 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy {
|
||||||
err => this.error = err.message
|
err => this.error = err.message
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
this.isAdministrationSub = this.route.data.subscribe(data => {
|
|
||||||
if (data.isAdministration) this.isAdministration = data.isAdministration
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy () {
|
ngOnDestroy () {
|
||||||
this.paramsSub.unsubscribe()
|
this.paramsSub.unsubscribe()
|
||||||
this.isAdministrationSub.unsubscribe()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
formValidated () {
|
formValidated () {
|
||||||
|
|
|
@ -44,8 +44,7 @@ export const UsersRoutes: Routes = [
|
||||||
data: {
|
data: {
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Update a user'
|
title: 'Update a user'
|
||||||
},
|
}
|
||||||
isAdministration: true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user