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