Update Auth Scope Handling in User KB Collection Preparation
- Added a comment to clarify that the __yao_created_by field is only set for create operations, ensuring consistency with the WithCreateScope function. - Removed the __yao_updated_by field from the auth scope, streamlining the user knowledge base collection preparation process.
This commit is contained in:
parent
4ba62600dc
commit
d95b911934
1 changed files with 1 additions and 1 deletions
|
|
@ -710,12 +710,12 @@ func prepareUserKBCollection(userID, teamID, locale string) {
|
|||
}
|
||||
|
||||
// Build auth scope (use __yao_ prefix for permission fields)
|
||||
// Only set __yao_created_by for create operations (consistent with WithCreateScope)
|
||||
authScope := make(map[string]interface{})
|
||||
if teamID != "" {
|
||||
authScope["__yao_team_id"] = teamID
|
||||
}
|
||||
authScope["__yao_created_by"] = userID
|
||||
authScope["__yao_updated_by"] = userID
|
||||
|
||||
// Create new collection for this user
|
||||
createParams := &kbapi.CreateCollectionParams{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue