fix: add can_view_cloud_data to login and profile API responses
- Add can_view_cloud_data field to auth login response - Add can_view_cloud_data field to agent profile response - Fetch latest user permissions from /agent/profile on agent layout mount - Update localStorage with latest can_view_cloud_data value
This commit is contained in:
@@ -614,12 +614,13 @@ func handleGetProfile(c *gin.Context) {
|
||||
}
|
||||
|
||||
response.Success(c, gin.H{
|
||||
"id": user.ID,
|
||||
"username": user.Username,
|
||||
"email": user.Email,
|
||||
"avatar": user.Avatar,
|
||||
"balance": user.Balance,
|
||||
"can_create_agent": user.CanCreateAgent,
|
||||
"id": user.ID,
|
||||
"username": user.Username,
|
||||
"email": user.Email,
|
||||
"avatar": user.Avatar,
|
||||
"balance": user.Balance,
|
||||
"can_create_agent": user.CanCreateAgent,
|
||||
"can_view_cloud_data": user.CanViewCloudData,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user