From ff2c1fe8133f9556f6aaa52058cd8b83c40085e6 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 22 May 2018 19:43:13 +0200 Subject: feature: IP filtering on signup page disable registration form on IP not in range checking the CIDR list before filtering with it placing the cidr filters as an attribute object in the config --- client/src/app/core/server/server.service.ts | 3 ++- client/src/app/menu/menu.component.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index c5353023b..ccae5a151 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts @@ -34,7 +34,8 @@ export class ServerService { }, serverVersion: 'Unknown', signup: { - allowed: false + allowed: false, + allowedForCurrentIP: false }, transcoding: { enabledResolutions: [] diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts index 4c35bb3a5..69216e215 100644 --- a/client/src/app/menu/menu.component.ts +++ b/client/src/app/menu/menu.component.ts @@ -52,7 +52,8 @@ export class MenuComponent implements OnInit { } isRegistrationAllowed () { - return this.serverService.getConfig().signup.allowed + return this.serverService.getConfig().signup.allowed && + this.serverService.getConfig().signup.allowedForCurrentIP } getFirstAdminRightAvailable () { -- cgit v1.2.3