Skip to content
Snippets Groups Projects
Commit e5731eda authored by Thomas Hackl's avatar Thomas Hackl
Browse files

handle admin and root accounts

parent 262a978f
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,10 @@ class MatrixChatController extends AuthenticatedController
$member = CourseMember::find([$this->course->id, User::findCurrent()->id]);
if (!$member || $GLOBALS['perm']->have_perm('admin')) {
$this->noMemberHint = true;
}
// Chat can only be used if user is visible (Matrix has no privacy settings in chat)
if ($member->visible == 'yes' || $member->visible == 'unknown' && Config::get()->USER_VISIBILITY_UNKNOWN) {
......
pluginname=Matrix-Chat
pluginclassname=MatrixPlugin
origin=data-quest
version=1.0
version=1.1.q
screenshot=assets/images/matrix_logo.png
description=Matrix chat for Stud.IP courses
studipMinVersion=4.5
......
<? if ($noMemberHint) : ?>
<div class="messagebox messagebox_warning">
<p>
<?= dgettext('matrix', 'Sie sind nicht als teilnehmende Person in dieser Veranstaltung ' .
'eingetragen und können daher den zu dieser Veranstaltung gehörenden Matrixraum nicht nutzen. Das ' .
'kann daran liegen, dass Sie eine Admin- oder Rootkennung nutzen.') ?>
</p>
</div>
<? endif ?>
<? if ($showAccountHint) : ?>
<div class="messagebox messagebox_warning">
<p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment