sdk.getBootstrap(). Use it to conditionally show or hide editing controls so viewers see a read-only interface while editors and admins get the full UI.
Getting the Role
Always callgetBootstrap() before rendering the UI:
Hiding Controls from Viewers
Inline Edit Controls
Show edit and delete buttons only for editors/admins:Proactive Check Before Write
Even if the UI hides write controls for viewers, always handleAccessDenied errors gracefully in case the role changes mid-session:
Bootstrap Data
getBootstrap() returns more than just the role:
bootstrap.user to personalize the UI or pre-fill the current user’s email in a form.