mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Fixed null reference
This commit is contained in:
parent
22020404b9
commit
c79fbdbf92
@ -6,7 +6,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
@if (!Model.Error)
|
@if (!Model.Error)
|
||||||
{
|
{
|
||||||
bool OwnProfile = (Model.Username == User.Identity.Name || User.IsInRole("Admin")) && User.Identity.IsAuthenticated;
|
bool OwnProfile = (User.Identity?.IsAuthenticated ?? false) && (Model.Username == User.Identity?.Name || User.IsInRole("Admin"));
|
||||||
string gitHost = Config.GitConfig.Host;
|
string gitHost = Config.GitConfig.Host;
|
||||||
string gitFullUrl = string.Empty;
|
string gitFullUrl = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(gitHost))
|
if (!string.IsNullOrEmpty(gitHost))
|
||||||
|
Loading…
Reference in New Issue
Block a user