From fadf83a50071ffba21db05eceff10c51c18f5fb3 Mon Sep 17 00:00:00 2001 From: Roy Date: Fri, 23 Feb 2018 12:03:18 +0200 Subject: Machine Studio Update & Publish. Improved user roles & permissions structure. Added permission for version publish. --- .../Authentication/DefaultAuthenticationProvider.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs index 82aba268d..110e4d148 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs @@ -50,7 +50,12 @@ namespace Tango.MachineStudio.UI.Authentication if (user == null) { - throw new AuthenticationException("Login failed for user " + email); + throw new AuthenticationException("Invalid credentials for " + email); + } + + if (!user.HasPermission(Permissions.RunMachineStudio)) + { + throw new AuthenticationException("It seems like you do not have sufficient privileges to run Machine Studio. Please contact your administrator."); } CurrentUser = user; -- cgit v1.3.1