This commit is contained in:
@@ -5,6 +5,7 @@ $displayName = 'Profil';
|
||||
$profileInitial = 'P';
|
||||
$showAdminLink = false;
|
||||
$showSystemLink = false;
|
||||
$showProfileLevelsLink = false;
|
||||
|
||||
if ($isLoggedIn) {
|
||||
try {
|
||||
@@ -27,6 +28,7 @@ if ($isLoggedIn) {
|
||||
$communityAccess = new \App\CommunityAccess($pdo, $communityConfig);
|
||||
$showAdminLink = $communityAccess->canModerateForum((int)$_SESSION['user_id']);
|
||||
$showSystemLink = $communityAccess->canManageApplications((int)$_SESSION['user_id']);
|
||||
$showProfileLevelsLink = $communityAccess->canManageRoles((int)$_SESSION['user_id']);
|
||||
}
|
||||
}
|
||||
} catch (\Throwable) {
|
||||
@@ -34,6 +36,7 @@ if ($isLoggedIn) {
|
||||
$profileInitial = 'P';
|
||||
$showAdminLink = false;
|
||||
$showSystemLink = false;
|
||||
$showProfileLevelsLink = false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -65,6 +68,9 @@ if ($isLoggedIn) {
|
||||
<a href="/dashboard?section=places" role="menuitem">Orte & Veranstaltungen</a>
|
||||
<a href="/dashboard?section=community" role="menuitem">Community</a>
|
||||
<a href="/dashboard?section=settings" role="menuitem">Einstellungen</a>
|
||||
<?php if ($showProfileLevelsLink): ?>
|
||||
<a href="/dashboard?section=profile-levels" role="menuitem">Profil-Levels</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($showSystemLink): ?>
|
||||
<a href="/dashboard?section=system" role="menuitem">System</a>
|
||||
<?php endif; ?>
|
||||
@@ -92,6 +98,9 @@ if ($isLoggedIn) {
|
||||
<a class="btn ghost" href="/dashboard?section=places">Orte & Veranstaltungen</a>
|
||||
<a class="btn ghost" href="/dashboard?section=community">Community</a>
|
||||
<a class="btn ghost" href="/dashboard?section=settings">Einstellungen</a>
|
||||
<?php if ($showProfileLevelsLink): ?>
|
||||
<a class="btn ghost" href="/dashboard?section=profile-levels">Profil-Levels</a>
|
||||
<?php endif; ?>
|
||||
<?php if ($showSystemLink): ?>
|
||||
<a class="btn ghost" href="/dashboard?section=system">System</a>
|
||||
<?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user