From ba268e739f4ea5e47864b203b6083a971abc6385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Andr=C3=A9?= Date: Wed, 17 Mar 2021 16:54:33 +0100 Subject: [PATCH] The new user is not Admin --- Back/skydiveLogs-api.DomainBusiness/UserService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Back/skydiveLogs-api.DomainBusiness/UserService.cs b/Back/skydiveLogs-api.DomainBusiness/UserService.cs index 90c8a84..0f01bca 100644 --- a/Back/skydiveLogs-api.DomainBusiness/UserService.cs +++ b/Back/skydiveLogs-api.DomainBusiness/UserService.cs @@ -35,6 +35,7 @@ namespace skydiveLogs_api.DomainBusiness if (foundUser == null) { + newUser.IsAdmin = false; result = _userRepository.Add(newUser); } @@ -49,7 +50,7 @@ namespace skydiveLogs_api.DomainBusiness using (Aes encryptor = Aes.Create()) { - Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(encryptionKey, + Rfc2898DeriveBytes pdb = new Rfc2898DeriveBytes(encryptionKey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.Key = pdb.GetBytes(32); encryptor.IV = pdb.GetBytes(16);