diff options
| author | Roy <roy.mail.net@gmail.com> | 2018-02-23 12:03:18 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2018-02-23 12:03:18 +0200 |
| commit | fadf83a50071ffba21db05eceff10c51c18f5fb3 (patch) | |
| tree | 9a568aae8d298bfbc2135afaff0b91f9de711793 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs | |
| parent | 042b4d3e7b0af729792ca20e086756c36d2f5768 (diff) | |
| download | Tango-fadf83a50071ffba21db05eceff10c51c18f5fb3.tar.gz Tango-fadf83a50071ffba21db05eceff10c51c18f5fb3.zip | |
Machine Studio Update & Publish.
Improved user roles & permissions structure.
Added permission for version publish.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs | 7 |
1 files changed, 6 insertions, 1 deletions
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; |
