- private init () {
- this.sanitizedCommentHTML = sanitizeHtml(this.comment.text, {
- allowedTags: [ 'p', 'span', 'br' ]
- })
+ private getUserIfNeeded (account: Account) {
+ if (!account.userId) return
+ if (!this.authService.isLoggedIn()) return
+
+ const user = this.authService.getUser()
+ if (user.hasRight(UserRight.MANAGE_USERS)) {
+ this.userService.getUserWithCache(account.userId)
+ .subscribe(
+ user => this.commentUser = user,
+
+ err => this.notifier.error(err.message)
+ )
+ }
+ }