Understanding Roles, Entitlements, and Permissions in the River System

Overview of Permissions

In the River ecosystem, Permissions are defined actions that users can undertake within a Space. These permissions are fundamental to governing user interactions and activities within the ecosystem. The River system includes a range of permissions, each tailored to specific functionalities:

  • ModifyChannels: This permission allows those who hold to to create, delete, edit, and assign roles to a given channel within a Space.
  • ModifyRoles: This permission enables users to create and modify roles and entitlements within a Space.
  • MintMembership: The Mint permission grants users the ability to mint a membership token for a given Space.
  • Read: The Read permission allows users to access and view message content within a Space.
  • Write: With the Write permission, users can create and modify message content within a Space.

Concept of Roles

Roles in the River system are aggregations of the aforementioned Permissions. By combining different permissions into distinct roles, the system simplifies the management of user capabilities and access within a Space.

Functionality of Entitlements

Entitlements play a crucial role in determining user eligibility for different Roles. They dictate how users qualify for certain Roles and can be specific to different Channels or the Space itself.

Implementation of Entitlement Modules

Entitlement Modules are instrumental in defining the requirements for Entitlements. These modules are akin to pricing modules, allowing for the deployment of bespoke smart contracts on the chain. To be incorporated into the River system, these contracts must adhere to the IEntitlement Interface and be deployed to Base, with their settings adjusted for each Space.

Default Settings in Spaces

Upon the minting of a new Space, the River system automatically deploys two standard Entitlement Modules:

  1. UserEntitlementModule: This module enables the assignment of Roles based on specific addresses or ENS. For instance, “vitalik.eth” could be assigned the Moderator Role, while “0x44..ccbb” might receive a Read-Only Role.
  2. TokenEntitlementModule: It facilitates the assignment of Roles based on the ownership of certain assets on-chain. An example would be assigning a Special Role to users holding a Cryptopunk or a Whale Role to those with at least .1 ETH.

Default Roles in Newly Minted Spaces

Each newly minted Space in the River system is initialized with two predefined Roles:

  • Owner:

    • Assigned automatically to the address holding the Owner NFT through the Token Entitlement Module.
    • This Role encompasses all permissions within the Space and is irrevocable.
  • Member:

    • Granted to any address holding a Member NFT.
    • By default, this Role includes “Read” and “Write” Permissions, allowing for basic interaction within the Space.

– Minter: – Granted implicitly to any address that meets the requirements for minting a Membership NFT.

  • This Role only include the ‘MintMembership’ permission.