Overview
useSpacePermissions is a utility hook that computes derived permission flags from a user’s raw membership permissions and the space’s permission settings. It is used internally by useSpaceData and exposed for cases where you need to compute permissions outside of a SpaceProvider.
Usage Example
Parameters
The raw membership permissions object from the space.
null or undefined if the user is not a member.The space’s posting permission setting.
The space’s reading permission setting. Defaults to
"anyone".Returns
Whether the user is an active member.
Whether the user is an admin.
Whether the user is a moderator.
Whether the user can post, given the space’s posting permission and their membership status.
Whether the user can moderate content.
Whether the user can read content, given the space’s reading permission.
Whether the user has a pending membership.
Whether the user is banned.

