docs(auth): correct updateMe role guidance - #262
Merged
Conversation
The updateMe JSDoc told readers they could set the built-in `role` field and shipped an example that did exactly that. A user reported a 403 "You do not have permission to update user roles" from the live API on 12 Aug 2026. In apper, `UserCRUD.update` pops `role` out of the payload and routes it through `update_user_role`, which requires editor access on the app or platform admin access. An ordinary app user has neither, so the request fails and no other field in the payload is applied. Changes: - Drop the claim that `role` is updatable, and drop `role` from the example so the snippet works when copied. - State that updating `role` needs editor access, rather than listing it as read-only. Owners and editor collaborators genuinely can change it. - Add `collaborator_role` to the protected-field list. The same function discards it silently, with no error at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/sdk@0.8.44-pr.262.1f0f5a7Prefer not to change any import paths? Install using npm alias so your code still imports npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.44-pr.262.1f0f5a7"Or add it to your {
"dependencies": {
"@base44/sdk": "npm:@base44-preview/sdk@0.8.44-pr.262.1f0f5a7"
}
}
Preview published to npm registry — try new features instantly! |
Leaves the requirement itself. The status code is response behavior, not something a reader needs in order to use the method correctly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
adamfri
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The
updateMeJSDoc tells readers they can set the built-inrolefield, in three separate places: the prose, the example's title, and the example body. Anyone who copies the snippet hits a 403.Why
Reported by a user on 12 Aug 2026, who tested against the live API before writing in:
They are right.
updateMesendsPUT /apps/{appId}/entities/User/me, which lands inUserCRUD.updatein apper:rolenever travels with the rest of the fields. It is pulled out and sent throughupdate_user_role, which requirescollaborator_role="editor"or platform blanket access. An ordinary signed-in app user has neither. Because the check runs before the payload merge, the 403 also means none of the other fields land.Changes
roleis updatable, and droprolefrom the example.rolerequires editor access, rather than movingroleinto the read-only list. Owners and editor collaborators genuinely can change it, so calling it read-only would be a second inaccuracy in the other direction.collaborator_roleto the protected-field list. The same function discards it withpayload.pop("collaborator_role", None)and no error, which is worse for the caller than a 403.Note on history
This wording came from
fix-updateme-role-docs-17-may-hadas, including a commit titled "Clarify updateMe: role is updatable, fix read-only field list." The most likely explanation is that it was tested as an app owner, where settingroledoes succeed. That path still works and is now documented as such.Docs
developers/references/sdk/docs/interfaces/authis generated from this JSDoc, so the fix has to land here or it gets wiped on the next regeneration. Regenerated output is in a paired mintlify-docs PR. Merge this one first.🤖 Generated with Claude Code