如何无需管理员权限获取Artifactory自身用户账户详情?
Artifactory: Can I Get My Own User Details Without Admin Permissions?
Absolutely! You don't need admin rights to fetch your own user details in Artifactory—this makes perfect sense, since accessing your own account information shouldn't require elevated privileges.
Key Development Recommendation
From a product logic standpoint, you should remove the admin permission flag that's currently required for users to view their own details.
Breakdown of the User Details API
Here's all relevant info about the endpoint:
- Function: Retrieve Artifactory user details
- Minimum Supported Version: 2.4.0
- Edition Requirement: Artifactory Pro
- Current (Unnecessary) Security Rule: Admin user (this should only apply when fetching other users' details, not your own)
- API Usage:
GET /api/security/users/{userName}- To access your own details, replace
{userName}with your currently logged-in username
- To access your own details, replace
- Response Format:
application/json(orapplication/vnd.org.jfrog.artifactory.security.User+json)
Example Request & Output
If your username is davids, send this request:
GET /api/security/users/davids
You'll receive the full user.json payload corresponding to your account.
内容的提问来源于stack exchange,提问作者Joe Bruns
相关产品推荐
相关产品推荐

