aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-07-17 15:25:51 +0200
committerBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2024-07-19 16:28:03 +0200
commit047479ccf9ff332cc249cd08d5c315394f3e48da (patch)
tree1001b114f3857338bba5e520e941fca4914a2be4 /lib/private/Group
parent202e5b1e957a7692165a313710e38406ca4f6ff3 (diff)
downloadnextcloud-server-047479ccf9ff332cc249cd08d5c315394f3e48da.tar.gz
nextcloud-server-047479ccf9ff332cc249cd08d5c315394f3e48da.zip
feat(security): Add public API to allow validating IP Ranges and checking for "in range"
Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'lib/private/Group')
-rw-r--r--lib/private/Group/Manager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Group/Manager.php b/lib/private/Group/Manager.php
index 67d6f8cbe9c..092c56fe00a 100644
--- a/lib/private/Group/Manager.php
+++ b/lib/private/Group/Manager.php
@@ -8,7 +8,6 @@
namespace OC\Group;
use OC\Hooks\PublicEmitter;
-use OC\Security\RemoteIpAddress;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Group\Backend\IBatchMethodsBackend;
use OCP\Group\Backend\ICreateNamedGroupBackend;
@@ -20,6 +19,7 @@ use OCP\ICacheFactory;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\IUser;
+use OCP\Security\Ip\IRemoteAddress;
use Psr\Log\LoggerInterface;
use function is_string;
@@ -60,7 +60,7 @@ class Manager extends PublicEmitter implements IGroupManager {
private IEventDispatcher $dispatcher,
private LoggerInterface $logger,
ICacheFactory $cacheFactory,
- private RemoteIpAddress $remoteIpAddress,
+ private IRemoteAddress $remoteAddress,
) {
$this->displayNameCache = new DisplayNameCache($cacheFactory, $this);
@@ -321,7 +321,7 @@ class Manager extends PublicEmitter implements IGroupManager {
* @return bool if admin
*/
public function isAdmin($userId) {
- if (!$this->remoteIpAddress->allowsAdminActions()) {
+ if (!$this->remoteAddress->allowsAdminActions()) {
return false;
}