mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Completes insufficient-role security coverage for admin-gated Web endpoints
This commit is contained in:
1 parent
3426ed7476
commit
2a8e3aa290
39 files changed
+647
-33
No files matched your search
+1
-1
@@ -55,6 +55,6 @@ public class AddLibraryViewEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
|
||||
Assert.Contains("access-denied", response.Headers.Location!.ToString());
|
||||
Assert.Equal("https://localhost/en-us/auth/access-denied", response.Headers.Location!.ToString());
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class DeleteLibraryEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
|
||||
Assert.Contains("access-denied", response.Headers.Location!.ToString());
|
||||
Assert.Equal("https://localhost/en-us/auth/access-denied", response.Headers.Location!.ToString());
|
||||
Assert.DoesNotContain(_apiFactory.ApiClientStub.DeleteEndpointsCalled, endpoint => endpoint == $"libraries/{libraryId}");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class EditLibraryViewEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
|
||||
Assert.Contains("access-denied", response.Headers.Location!.ToString());
|
||||
Assert.Equal("https://localhost/en-us/auth/access-denied", response.Headers.Location!.ToString());
|
||||
Assert.DoesNotContain(_apiFactory.ApiClientStub.GetEndpointsCalled, endpoint => endpoint == $"libraries/{libraryId}");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class SaveLibraryEndpointTests : IClassFixture<LuminaWebFactory>
|
||||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
|
||||
Assert.Contains("access-denied", response.Headers.Location!.ToString());
|
||||
Assert.Equal("https://localhost/en-us/auth/access-denied", response.Headers.Location!.ToString());
|
||||
Assert.DoesNotContain(_apiFactory.ApiClientStub.PostRequests, postRequest => postRequest.Endpoint == "libraries");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ public class GetAllUsersConsumptionStatisticsEndpointTests : IClassFixture<Lumin
|
||||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
|
||||
Assert.Contains("access-denied", response.Headers.Location!.ToString());
|
||||
Assert.Equal("https://localhost/en-us/auth/access-denied", response.Headers.Location!.ToString());
|
||||
Assert.DoesNotContain(_apiFactory.ApiClientStub.GetEndpointsCalled, endpoint => endpoint.StartsWith("users/", StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class GetUsersEndpointTests : IClassFixture<LuminaWebFactory>, IDisposabl
|
||||
|
||||
// Assert
|
||||
Assert.Equal(HttpStatusCode.Redirect, response.StatusCode);
|
||||
Assert.Contains("access-denied", response.Headers.Location!.ToString());
|
||||
Assert.Equal("https://localhost/en-us/auth/access-denied", response.Headers.Location!.ToString());
|
||||
Assert.DoesNotContain(EXPECTED_UPSTREAM_PATH, _apiFactory.ApiClientStub.GetEndpointsCalled);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user