Skip to content

Commit

Permalink
show meetings profile navigation only for logged in user
Browse files Browse the repository at this point in the history
  • Loading branch information
tgloeggl committed Oct 26, 2018
1 parent 3f6c8bd commit 9334288
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions MeetingPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,13 @@ public function __construct()
Navigation::addItem('/admin/config/meetings', $item);
}
} elseif ($perm->have_perm('dozent')) {
$item = new Navigation($this->_('Meine Meetings'), PluginEngine::getLink($this, array(), 'index/my'));
if (Navigation::hasItem('/profile') && !Navigation::hasItem('/profile/meetings')) {
Navigation::addItem('/profile/meetings', $item);
$current_user = User::findByUsername(Request::username('username', $GLOBALS['user']->username));

if ($current_user->id == $GLOBALS['user']->id) {
$item = new Navigation($this->_('Meine Meetings'), PluginEngine::getLink($this, array(), 'index/my'));
Navigation::addItem('/profile/meetings', $item);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion plugin.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pluginname=Meetings
pluginclassname=MeetingPlugin
origin=elan-ev
version=1.5.1
version=1.5.2
studipMinVersion=4.0
studipMaxVersion=4.2
description=Virtueller Raum, mit dem Live-Online-Treffen, ***REMOVED***e und Videokonferenzen durchgeführt werden können.
Expand Down

0 comments on commit 9334288

Please sign in to comment.