-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
public, require password for guests, moderator approval for guests, only Nextcloud users fix #10 fix #24
- Loading branch information
Showing
16 changed files
with
253 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
<?php | ||
|
||
OCP\Util::addScript ( 'bbb', 'filelist'); | ||
OCP\Util::addScript ( 'bbb', 'filelist'); | ||
|
||
$apiUrl = \OC::$server->getConfig()->getAppValue('bbb', 'api.url'); | ||
$parsedApiUrl = @parse_url($apiUrl); | ||
|
||
if ($parsedApiUrl !== false) { | ||
$manager = \OC::$server->getContentSecurityPolicyManager(); | ||
$policy = new \OCP\AppFramework\Http\EmptyContentSecurityPolicy(); | ||
|
||
$policy->addAllowedFormActionDomain(($parsedApiUrl['scheme'] ?: 'https') . '://' . $parsedApiUrl['host']); | ||
|
||
$manager->addDefaultPolicy($policy); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OCA\BigBlueButton\Migration; | ||
|
||
use Closure; | ||
use OCA\BigBlueButton\Db\Room; | ||
use OCP\DB\ISchemaWrapper; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
/** | ||
* Auto-generated migration step: Please modify to your needs! | ||
*/ | ||
class Version000000Date20200604130935 extends SimpleMigrationStep | ||
{ | ||
/** | ||
* @param IOutput $output | ||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
* @param array $options | ||
* @return null|ISchemaWrapper | ||
*/ | ||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) | ||
{ | ||
/** @var ISchemaWrapper $schema */ | ||
$schema = $schemaClosure(); | ||
|
||
if ($schema->hasTable('bbb_rooms')) { | ||
$table = $schema->getTable('bbb_rooms'); | ||
|
||
if (!$table->hasColumn('access')) { | ||
$table->addColumn('access', 'string', [ | ||
'notnull' => true, | ||
'default' => Room::ACCESS_PUBLIC, | ||
]); | ||
} | ||
|
||
if (!$table->hasColumn('password')) { | ||
$table->addColumn('password', 'string', [ | ||
'length' => 64, | ||
'notnull' => false, | ||
]); | ||
} | ||
|
||
return $schema; | ||
} | ||
|
||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** @var $_ array */ | ||
/** @var $l \OCP\IL10N */ | ||
style('core', 'guest'); | ||
script('bbb', 'join'); | ||
?> | ||
<form method="get" action="?"> | ||
<fieldset class="warning bbb"> | ||
<h2><?php p($_['room']) ?></h2> | ||
<?php if (!isset($_['wrongdisplayname']) || !$_['wrongdisplayname']): ?> | ||
<p><?php p($l->t('Please enter your name!')); ?></p> | ||
<?php endif; ?> | ||
<?php if (isset($_['wrongdisplayname']) && $_['wrongdisplayname']): ?> | ||
<div class="warning"><?php p($l->t('The name must be at least 3 characters long.')); ?></div> | ||
<?php endif; ?> | ||
<?php if (isset($_['wrongPassword']) && $_['wrongPassword']): ?> | ||
<div class="warning"><?php p($l->t('You have to provide the correct password to join the meeting.')); ?></div> | ||
<?php endif; ?> | ||
<div class="bbb-container"> | ||
<label for="displayname" class="infield"><?php p($l->t('Display name')); ?></label> | ||
<input type="text" name="displayname" id="displayname" class="bbb-input" | ||
placeholder="<?php p($l->t('Display name')); ?>" value="" | ||
required minlength="3" autofocus /> | ||
<?php if (isset($_['passwordRequired']) && $_['passwordRequired']): ?> | ||
<label for="password" class="infield"><?php p($l->t('Password')); ?></label> | ||
<input type="text" name="password" id="password" class="bbb-input" | ||
placeholder="<?php p($l->t('Password')); ?>" value="" | ||
required minlength="8" /> | ||
<button class="primary"><?php p($l->t('Join')); ?> | ||
<div class="submit-icon icon-confirm-white"></div></button> | ||
<?php else: ?> | ||
<input type="submit" id="displayname-submit" | ||
class="svg icon-confirm input-button-inline" value="" /> | ||
<?php endif; ?> | ||
|
||
</div> | ||
</fieldset> | ||
</form> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
70b06aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while config is possible, save of the config is not possible. NC 18.0.5, build of the app from current master
70b06aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you execute the migration? Because without version bump they are not executed automatically.
70b06aa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2nd edit
ok, removed the migration status from the nc database and reinstalled the app; now passwords are working perfectly. The welcome message is displayed perfectly.
Good Stuff! Thanks a ton!