]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/overview/users/user-edit/user-edit.ts
Allow admins to disable two factor auth
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / overview / users / user-edit / user-edit.ts
index 6dae4110d43ef00baab89c243cdcc896bda887d3..21e9629aba71e45d2524c16a27ec3b5308beae5b 100644 (file)
@@ -60,10 +60,22 @@ export abstract class UserEdit extends FormReactive implements OnInit {
     ]
   }
 
+  displayDangerZone () {
+    if (this.isCreation()) return false
+    if (this.user?.pluginAuth) return false
+    if (this.auth.getUser().id === this.user.id) return false
+
+    return true
+  }
+
   resetPassword () {
     return
   }
 
+  disableTwoFactorAuth () {
+    return
+  }
+
   getUserVideoQuota () {
     return this.form.value['videoQuota']
   }