mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
parent
5872e23562
commit
19c5111170
2 changed files with 29 additions and 4 deletions
|
@ -2571,11 +2571,12 @@ if (typeof gtag !== \"function\") {
|
||||||
|
|
||||||
public static function canCreateMeet()
|
public static function canCreateMeet()
|
||||||
{
|
{
|
||||||
global $global, $config;
|
$p = AVideoPlugin::isEnabledByName('Meet');
|
||||||
if (self::isLogged() && !empty($_SESSION['user']['canCreateMeet'])) {
|
if(empty($p)){
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
return self::isAdmin();
|
|
||||||
|
return Meet::canCreateMeet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function canComment()
|
public static function canComment()
|
||||||
|
|
|
@ -15,6 +15,8 @@ User::loginFromRequestIfNotLogged();
|
||||||
//use \Firebase\JWT\JWT;
|
//use \Firebase\JWT\JWT;
|
||||||
class Meet extends PluginAbstract
|
class Meet extends PluginAbstract
|
||||||
{
|
{
|
||||||
|
const PERMISSION_CAN_CREATE_MEET = 0;
|
||||||
|
|
||||||
public function getTags()
|
public function getTags()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
@ -694,4 +696,26 @@ Passcode: {password}
|
||||||
$buttonTitle = $obj->buttonTitle;
|
$buttonTitle = $obj->buttonTitle;
|
||||||
include $global['systemRootPath'] . 'plugin/Meet/getUploadMenuButton.php';
|
include $global['systemRootPath'] . 'plugin/Meet/getUploadMenuButton.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPermissionsOptions()
|
||||||
|
{
|
||||||
|
$permissions = array();
|
||||||
|
|
||||||
|
$permissions[] = new PluginPermissionOption(self::PERMISSION_CAN_CREATE_MEET, __("Can create meetings"), "Members of the designated user group will have access create meetings", 'Meet');
|
||||||
|
return $permissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
static function canCreateMeet()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (User::isAdmin() || isCommandLineInterface()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!User::isLogged()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !empty($_SESSION['user']['canCreateMeet']) || Permissions::hasPermission(self::PERMISSION_CAN_CREATE_MEET, 'Meet');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue