mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
(Refactor) : Converted Selenium test for CanUseRoleManager and Others to playwright (#6996)
* refactor: resovled merge conflict Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * (Refactor): Removed Selenium Test for CanUseRoleManager Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * Refactor : removed spacing and extra alert message Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * (Test):Converted/Added Playwright Test for CanSigninWithLoginCode Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * (Refactor): Removed Selenium Test for CanSigninWithLoginCode Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * fix: updated UIServerController.Roles.cs to handle storeID Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * refactor : updated some minor nits Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * Fix: Preserve store context when deleting server-wide roles from store page Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> * refactor: fix auth mismatch in role Edit/Remove links for store context Signed-off-by: Abhijay007 <Abhijay007j@gmail.com> --------- Signed-off-by: Abhijay007 <Abhijay007j@gmail.com>
This commit is contained in:
@@ -122,7 +122,11 @@ public partial class UIStoresController
|
||||
[FromServices] StoreRepository storeRepository,
|
||||
string role)
|
||||
{
|
||||
var roleData = await storeRepository.GetStoreRole(new StoreRoleId(storeId, role), true);
|
||||
var roleId = await storeRepository.ResolveStoreRoleId(storeId, role);
|
||||
if (roleId == null)
|
||||
return NotFound();
|
||||
|
||||
var roleData = await storeRepository.GetStoreRole(roleId, true);
|
||||
if (roleData == null)
|
||||
return NotFound();
|
||||
|
||||
@@ -142,7 +146,10 @@ public partial class UIStoresController
|
||||
[FromServices] StoreRepository storeRepository,
|
||||
string role)
|
||||
{
|
||||
var roleId = new StoreRoleId(storeId, role);
|
||||
var roleId = await storeRepository.ResolveStoreRoleId(storeId, role);
|
||||
if (roleId == null)
|
||||
return NotFound();
|
||||
|
||||
var roleData = await storeRepository.GetStoreRole(roleId, true);
|
||||
if (roleData == null)
|
||||
return NotFound();
|
||||
|
||||
Reference in New Issue
Block a user