Files
headlamp-sealed-secrets-plugin/docs/api-reference/generated/hooks/usePermissions/functions/useIsReadOnly.md
T
Chris Farhood 46d59b48b5 chore: migrate repository to privilegedescalation organization
Updated all GitHub URLs from cpfarhood to privilegedescalation organization:
- Repository URLs in package.json and Artifact Hub metadata
- Documentation links and references
- Git remote updated

No functional changes - this is purely an organizational migration.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 10:50:30 -05:00

47 lines
933 B
Markdown

[**Headlamp Sealed Secrets API v0.2.0**](../../../README.md)
***
[Headlamp Sealed Secrets API](../../../README.md) / [hooks/usePermissions](../README.md) / useIsReadOnly
# Function: useIsReadOnly()
> **useIsReadOnly**(`namespace?`): `object`
Defined in: [src/hooks/usePermissions.ts:127](https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin/blob/bdf19cd3bf5a2d679b7ba949108fe9df1843c5f4/headlamp-sealed-secrets/src/hooks/usePermissions.ts#L127)
Hook to check if user has read-only access
Returns true if user can read/list but cannot create/update/delete.
## Parameters
### namespace?
`string`
Optional namespace to check
## Returns
`object`
Object with loading state and isReadOnly flag
### loading
> **loading**: `boolean`
### isReadOnly
> **isReadOnly**: `boolean`
## Example
```ts
const { loading, isReadOnly } = useIsReadOnly('default');
if (isReadOnly) {
// Show read-only warning
}
```