mirror of
https://github.com/freedbygrace/ActiveDirectoryManager.git
synced 2026-08-19 23:07:12 +00:00
Remove admin-only user listing endpoint from documentation
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/06732ee7-d10c-4148-8f3c-ef55a9b3e6f2.jpg
This commit is contained in:
+1
-22
@@ -455,28 +455,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
// Removed from Swagger documentation - non-AD user endpoint
|
||||||
* @swagger
|
|
||||||
* /api/users:
|
|
||||||
* get:
|
|
||||||
* summary: List all users (admin only)
|
|
||||||
* tags: [Users]
|
|
||||||
* security:
|
|
||||||
* - cookieAuth: []
|
|
||||||
* responses:
|
|
||||||
* 200:
|
|
||||||
* description: A list of users
|
|
||||||
* content:
|
|
||||||
* application/json:
|
|
||||||
* schema:
|
|
||||||
* type: array
|
|
||||||
* items:
|
|
||||||
* $ref: '#/components/schemas/User'
|
|
||||||
* 401:
|
|
||||||
* $ref: '#/components/responses/UnauthorizedError'
|
|
||||||
* 403:
|
|
||||||
* description: Forbidden - admin access required
|
|
||||||
*/
|
|
||||||
app.get("/api/users", requireAdmin, async (req, res, next) => {
|
app.get("/api/users", requireAdmin, async (req, res, next) => {
|
||||||
try {
|
try {
|
||||||
const users = await storage.listUsers();
|
const users = await storage.listUsers();
|
||||||
|
|||||||
Reference in New Issue
Block a user