aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web/Tango.MachineService/Controllers
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2025-04-22 21:51:47 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2025-04-22 21:51:47 +0300
commitf33925e973cfaa9be4d46abd81f63afe787c6607 (patch)
tree8765cbd70e13bcf2386343f1d7475b3bbb306869 /Software/Visual_Studio/Web/Tango.MachineService/Controllers
parentf0d2b8a0c3014aea6030c2ab0847755e5f67a6c0 (diff)
downloadTango-f33925e973cfaa9be4d46abd81f63afe787c6607.tar.gz
Tango-f33925e973cfaa9be4d46abd81f63afe787c6607.zip
Prevent AD group check using AD Graph API.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/AccountController.cs8
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/MachineStudioController.cs8
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs8
3 files changed, 12 insertions, 12 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/AccountController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/AccountController.cs
index 0a395b00e..44f3ea445 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/AccountController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/AccountController.cs
@@ -37,10 +37,10 @@ namespace Tango.MachineService.Controllers
{
var authResult = _ad_manager.ValidateUserCredentials(request.Email, request.Password);
- if (!_ad_manager.CanUserAccessCurrentEnvironment(request.Email))
- {
- throw new AuthenticationException($"You do not have permissions to access the {MachineServiceConfig.DEPLOYMENT_SLOT.ToDescription()} environment.");
- }
+ //if (!_ad_manager.CanUserAccessCurrentEnvironment(request.Email))
+ //{
+ // throw new AuthenticationException($"You do not have permissions to access the {MachineServiceConfig.DEPLOYMENT_SLOT.ToDescription()} environment.");
+ //}
FormsAuthentication.SetAuthCookie(request.Email, true);
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/MachineStudioController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/MachineStudioController.cs
index 7eda111d0..23e7e5ce6 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/MachineStudioController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/MachineStudioController.cs
@@ -312,10 +312,10 @@ namespace Tango.MachineService.Controllers
throw new AuthenticationException(ex.FlattenMessage());
}
- if (!_ad_manager.CanUserAccessCurrentEnvironment(request.Email))
- {
- throw new AuthenticationException($"You do not have permissions to access the {MachineServiceConfig.DEPLOYMENT_SLOT.ToDescription()} environment.");
- }
+ //if (!_ad_manager.CanUserAccessCurrentEnvironment(request.Email))
+ //{
+ // throw new AuthenticationException($"You do not have permissions to access the {MachineServiceConfig.DEPLOYMENT_SLOT.ToDescription()} environment.");
+ //}
using (ObservablesContext db = ObservablesWebContext.CreateContext())
{
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
index 17f6ba324..b60bc77c0 100644
--- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
+++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs
@@ -1072,10 +1072,10 @@ namespace Tango.MachineService.Controllers
{
var authResult = _ad_manager.ValidateUserCredentials(request.Email, request.Password);
- if (!_ad_manager.CanUserAccessCurrentEnvironment(request.Email))
- {
- throw new AuthenticationException($"You do not have permissions to access the {MachineServiceConfig.DEPLOYMENT_SLOT.ToDescription()} environment.");
- }
+ //if (!_ad_manager.CanUserAccessCurrentEnvironment(request.Email))
+ //{
+ // throw new AuthenticationException($"You do not have permissions to access the {MachineServiceConfig.DEPLOYMENT_SLOT.ToDescription()} environment.");
+ //}
BasicHashGenerator hash = new BasicHashGenerator();
String pass = hash.Encrypt(request.Password);