Overview
useSpacePermissions is a utility hook that turns a space’s memberPermissions into flat permission flags. Every flag comes from the server’s calculation (see How permissions are calculated); the hook never works them out from the space’s settings. When memberPermissions is missing (for example while the space is loading), every flag is false. It is used internally by useSpaceData and exposed for cases where you need the flags outside of a SpaceProvider.
Usage Example
Parameters
The space’s
memberPermissions, which every single-space fetch returns, for members and non-members alike. null or undefined makes every flag false.The space’s posting permission setting. It doesn’t change the flags.
The space’s reading permission setting. Defaults to
"anyone". It doesn’t change the flags.
