fix agent settings permissions#670
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cf7560926b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <div style={{ display: 'flex', gap: '10px', marginTop: '20px' }}> | ||
| <button className="btn btn-secondary" onClick={() => setActiveTab('chat')}>{t('agent.actions.chat')}</button> | ||
| <button className="btn btn-secondary" onClick={() => setActiveTab('settings')}>{t('agent.tabs.settings')}</button> | ||
| {canManage && <button className="btn btn-secondary" onClick={() => setActiveTab('settings')}>{t('agent.tabs.settings')}</button>} |
There was a problem hiding this comment.
Keep the read-only settings tab reachable
For use access, the tab filter above still removes settings from the tab bar, and the top settings button only navigates to /settings where useAgentDetailRoute defaults to the status tab. With this new canManage guard, use-only users lose the only visible control that selected the actual settings tab, so the read-only SettingsTab/OpenClawSettings work added in this change is not discoverable unless the user manually edits the hash to #settings.
Useful? React with 👍 / 👎.
Fixes #603
Summary
Validation
git diff --check