mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Permissions are now always false when permission calculation hasn't been done yet
lack of permission calculation means that child permissions might not have been set correctly, so this might lead to users being able to access things they aren't supposed to.
This commit is contained in:
@@ -79,14 +79,7 @@ class PermissibleBase implements Permissible{
|
||||
return $this->permissions[$name]->getValue();
|
||||
}
|
||||
|
||||
if(($perm = PermissionManager::getInstance()->getPermission($name)) !== null){
|
||||
$perm = $perm->getDefault();
|
||||
|
||||
return $perm === Permission::DEFAULT_TRUE or ($this->isOp() and $perm === Permission::DEFAULT_OP) or (!$this->isOp() and $perm === Permission::DEFAULT_NOT_OP);
|
||||
}else{
|
||||
return Permission::$DEFAULT_PERMISSION === Permission::DEFAULT_TRUE or ($this->isOp() and Permission::$DEFAULT_PERMISSION === Permission::DEFAULT_OP) or (!$this->isOp() and Permission::$DEFAULT_PERMISSION === Permission::DEFAULT_NOT_OP);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user