Profile Field Lock
Overview
Profile field lock is a backend-driven feature: a community administrator configures which profile fields — nickname, avatar (profile picture), and bio — are editable, read-only, or hidden directly in the Octopus API key configuration. The SDK reads the lock automatically from the backend config on each community config fetch and adapts the profile UI accordingly — no SDK code changes are required in the app.
Communities that set no lock default to fully editable, which is identical to the behavior before this feature was introduced.
Lock states
Each profile field can be in one of three states:
| State | Meaning |
|---|---|
| Editable (default) | The field is shown and modifiable — identical to the current behavior. This is the default for any field not configured by the backend. |
| Read-only | The field's current value is displayed, but the edit affordance is hidden. The user cannot modify the field inside the community UI. |
| Disabled | The field is hidden entirely — no display of the current value, no prompt. Only valid for bio. Nickname and avatar cannot be disabled, only editable or read-only. |
The lock is read-only from the SDK consumer's perspective — it cannot be overridden in app code. It reflects the backend API key configuration.
When all three fields (nickname, avatar, bio) are in the default editable state (i.e., no lock configured), the SDK behavior is identical to previous versions. Existing communities are unaffected.
Per-field behavior
Nickname
- Editable (default): shown and modifiable. Users are prompted to confirm their nickname before posting for the first time (existing behavior).
- Read-only: shown but not editable. The first-post nickname confirmation screen is skipped — the user posts directly with the community-assigned (auto-generated) nickname without a confirmation prompt. This is automatic SDK behavior.
- Cannot be disabled.
Avatar (profile picture)
- Editable (default): shown with the add/edit overlay; tapping opens the edit flow.
- Read-only: shown as a plain image with no add/edit overlay; tap is disabled.
- Cannot be disabled.
Bio
- Editable (default): shown with an "Add a bio" prompt if empty; tapping opens the edit flow.
- Read-only: existing bio is shown as plain text; no "Add a bio" prompt is displayed.
- Disabled: the bio section is removed entirely — neither the current value nor an "Add a bio" prompt is shown.
Edit Profile screen behavior
The edit-profile screen shows only fields that are editable. Read-only or disabled fields are hidden entirely — they do not appear as greyed-out fields, they are absent from the screen.
The "Edit profile" button in the profile summary view is visible as long as at least one of nickname, avatar, or bio remains editable. If all three are locked (read-only or disabled), the button is hidden.
Interaction with SSO appManagedFields
If a field is both listed in the SSO appManagedFields at initialization and locked by the community config, appManagedFields wins for that field: the user is redirected to the host app's profile editor (the "edit in app" flow) rather than being blocked. The community lock applies only to fields not already managed by the host app.
Configuration
- Android
- iOS
- Flutter
- React Native
- Unity
No SDK code is required. The lock is set via the Octopus API key configuration in the backend. The Android SDK reads the lock from the community config response and applies it automatically.
The following public types are available under com.octopuscommunity.sdk.domain.model for inspection — app code does not need to interact with them directly:
import com.octopuscommunity.sdk.domain.model.ProfileFieldLockState
import com.octopuscommunity.sdk.domain.model.ProfileFieldsLock
// ProfileFieldLockState — per-field editability status:
// EDITABLE — default, field is shown and modifiable
// READ_ONLY — value is displayed but not modifiable
// DISABLED — field is hidden entirely (bio only)
// ProfileFieldsLock — holds the lock state for each field:
// nickname: ProfileFieldLockState
// avatar: ProfileFieldLockState
// bio: ProfileFieldLockState
// ProfileFieldsLock.AllEditable — the default when no lock is configured
The lock state is also accessible on CommunityConfig:
// CommunityConfig.profileFieldsLock: ProfileFieldsLock
// Defaults to ProfileFieldsLock.AllEditable when the backend sends no lock configuration.
To enable a profile field lock, configure profileFieldsLock in your community's API key settings in the Octopus backend. Contact your Octopus account manager for setup instructions.
No SDK code is required. The lock is set via the Octopus API key configuration in the backend. The iOS SDK reads the lock from the proto configuration response and applies it automatically.
The following public types are available under the Octopus module for inspection — app code does not need to interact with them directly:
import Octopus
// ProfileFieldLockState — per-field editability status:
// .editable — default, field is shown and modifiable
// .readOnly — value is displayed but not modifiable
// .disabled — field is hidden entirely (bio only)
// ProfileFieldsLock — holds the lock state for each field:
// .nickname: ProfileFieldLockState
// .avatar: ProfileFieldLockState
// .bio: ProfileFieldLockState
// ProfileFieldsLock.allEditable — the default when no lock is configured
The lock state is also accessible on CommunityConfig:
// CommunityConfig.profileFieldsLock: ProfileFieldsLock
// Defaults to .allEditable when the backend sends no lock configuration.
To enable a profile field lock, configure profileFieldsLock in your community's API key settings in the Octopus backend. Contact your Octopus account manager for setup instructions.
Profile field lock is not yet available on Flutter.
Profile field lock is not yet available on React Native.
Profile field lock is not yet available on Unity.