Skip to content

Conversation

@yxrxy
Copy link
Contributor

@yxrxy yxrxy commented Dec 8, 2025

#1020
closes: #1064

Type of Change

  • New Feature

Related Issues

Summary of Changes

Checklist

  • I have read and followed the CONTRIBUTING.md guidelines
  • Passed make pre-commit

Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new admin API endpoint to check whether a user has administrator privileges. The endpoint validates user credentials and compares them against the system's global admin credentials.

  • Adds a new /rustfs/admin/v3/is-admin GET endpoint
  • Implements authentication check using existing credential validation
  • Returns JSON response indicating admin status with access key and message

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
rustfs/src/admin/mod.rs Registers the new IsAdminHandler to the admin route with GET method at /rustfs/admin/v3/is-admin path
rustfs/src/admin/handlers.rs Implements IsAdminResponse struct and IsAdminHandler operation to validate credentials and check admin status against global credentials

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@houseme
Copy link
Contributor

houseme commented Dec 8, 2025

@yxrxy please

@yxrxy yxrxy requested a review from houseme December 8, 2025 13:03
@houseme houseme merged commit af65071 into rustfs:main Dec 8, 2025
12 checks passed
@yxrxy yxrxy deleted the fix/20 branch December 8, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an API for Admin verification

2 participants