einbau von rollen, neue Admin Ansicht
This commit is contained in:
@@ -137,7 +137,7 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
} @if( user?.email===keycloakUser?.email || isAdmin()){
|
||||
} @if( user?.email===keycloakUser?.email || (authService.isAdmin() | async)){
|
||||
<button class="mt-4 bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600" [routerLink]="['/account', user.id]">Edit</button>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ListingsService } from '../../../services/listings.service';
|
||||
import { SelectOptionsService } from '../../../services/select-options.service';
|
||||
import { UserService } from '../../../services/user.service';
|
||||
import { SharedModule } from '../../../shared/shared/shared.module';
|
||||
import { formatPhoneNumber, isAdmin, map2User } from '../../../utils/utils';
|
||||
import { formatPhoneNumber, map2User } from '../../../utils/utils';
|
||||
|
||||
@Component({
|
||||
selector: 'app-details-user',
|
||||
@@ -45,7 +45,7 @@ export class DetailsUserComponent {
|
||||
private sanitizer: DomSanitizer,
|
||||
private imageService: ImageService,
|
||||
public historyService: HistoryService,
|
||||
private authService: AuthService,
|
||||
public authService: AuthService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -59,8 +59,4 @@ export class DetailsUserComponent {
|
||||
this.companyOverview = this.sanitizer.bypassSecurityTrustHtml(this.user.companyOverview ? this.user.companyOverview : '');
|
||||
this.offeredServices = this.sanitizer.bypassSecurityTrustHtml(this.user.offeredServices ? this.user.offeredServices : '');
|
||||
}
|
||||
|
||||
isAdmin() {
|
||||
return isAdmin(this.user.email);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user