const RoleOwner, RoleAdmin, RoleModerator, RoleGuest
List of Boards2 member roles.
Boards2 is a social discussion forum for open communication and community-driven conversations.
Boards2 is a social discussion forum for open communication and community-driven conversations.
Users can start discussions by creating or reposting threads and then submitting comments or replies to other user comments.
Discussions happen within different boards, where each board is an independent self managed community.
Boards2 allows users to create two types of boards, one is the invite only board where only invited users can create threads and comment, and where non invited users can only read the content and discussions; The other type of board is the open board where any user with a specific amount of GNOT in their account can create threads, repost and comment.
If you are new to Gno.land in general, the quick start guide below can help you get started.
What you need to create threads and start commenting within open boards is having a specific amount of GNOT in your Gno.land user account, which by default initially is 3000 GNOT. This initial GNOT amount could be changed over time to a different amount, so this requirement can change.
To use Boards2 you'll need a Gno.land address. You can quickly setup your account using Adena or any Gno.land compatible wallet by following these steps:
For testing networks you can use the official Faucet Hub to receive GNOT in your account.
Once you have the required GNOT amount in your account you can start commenting, creating and reposting threads within any open board.
To comment and engage on an open board discussion visit a thread and click on the "Comment" link. You can also reply to any of the thread's comments by clicking on the "Reply" link.
To create threads, visit an open board and then click on the "Create Thread" link, there you will have to enter a title and some content for the thread body.
Thread and comments content can be written as plaintext, or Markdown if you want to format the content so it's rendered as rich text.
You can also repost any thread, even the ones from invite only boards, into any open board. To do so visit the thread you want to repost and click on the "Repost" link at the bottom of the thread, there you will have to enter the open board where you want the repost to be created, a title for the thread repost and optionally also some content to render at the top of the repost. The optional content can also be written as plaintext or Markdown, like threads.
After your thread, repost or comment is created, you can easily share the link with others so they can join the discussion!
Boards2 realm enables the creation of different communities though independent boards.
When a board is created, and independetly of the board type, it initially has a single "owner" member
assigned by default, which is the user that creates it. The member is called "owner" because by default it
has the owner role, which grants all permissions within that board.
Members of a board with the owner or admin role, independently of the board type, can invite other
members, or otherwise users can request being invited to be a member by visiting the board and clicking the
"Request Invite" link. Requested invites can be accepted or revoked though the board's "Invite Requests" view
or using these public realm functions:
1// AcceptInvite accepts a board invite request.
2func AcceptInvite(_ realm, boardID boards.ID, user address)
3
4// RevokeInvite revokes a board invite request
5func RevokeInvite(_ realm, boardID boards.ID, user address)
There are four possible roles that invited users can have when they are members of a board:
owner: Grants all available permissionsadmin: Grants basic, moderator and advanced permissions, like being able to rename boards, add or remove
members, or change their role.moderator: Grants basic and moderation related permissions, like being able to ban or unban users, or
flag content.guest: Grants basic permissions that allow creating threads, reposting and commenting.Default board configuration, permissions and roles are defined in the permissions file.
No roles or number of members is enforced for boards, so technically a board can be updated to have no
members, or for example, boards could exists without any "owner" if all members with owner role are removed
from it.
Other custom user defined roles can exists on top of the default ones though custom board implementations.
Boards2 realm allows users to customize the mechanics of their boards when the default ones doesn't make sense to that community, or when users want to integrate a board with their realms.
An example of this would be a case where thread creation should be allowed only though a new publisher
role, or a case where a community have their own DAO realm and governance implementation and are looking to
integrate it into their board mechanics by creating threads though proposals that must be approved for the
thread to be published.
Each board can customize the way it works by implementing the Permissions interface that is defined in the
gno.land/p/gnoland/boards package. It is though the implementation of that interface within a new realm
that the default board mechanics can be customized. The new realm can then be used to create an instance of
a custom Permissions implementation to replace the one assigned by default to a board.
Right now only Boards2 realm owner members are allowed to change default board permissions using a public
realm function:
1// SetPermissions sets a permissions implementation for boards2 realm or a board
2func SetPermissions(_ realm, boardID boards.ID, p boards.Permissions)
This function will be replaced by a proposal that would need to pass for the custom permissions to be applied to a board once Boards2 governance is implemented.
Permissions implementation allow communities to customize the way they want to manage users and roles,
where or how they should be stored, and the requirements or effects different board actions have.
Boards2 provides a custom Permissions implementation in gno.land/r/gnoland/boards2/v1/permissions that
can be imported by realms and used to implement custom boards.
By default boards are created with an undelying DAO, so each new board is linked to an independent DAO which is used to organize members by role, and can also be used to update boards in a permissionless manner.
Right now is possible to integrate with the underlying DAO and change the default board mechanics to rely on proposals using a custom board implementation, by creating a new realm that imports and uses the gno.land/r/gnoland/boards2/v1/permissions realm, which exposes the underlying DAO.
Current Boards2 realm implementation doesn't run proposals, but some of the current mechanics will rely on DAO proposals to actually execute changes.
Threads and comments are moderated by flagging, which requires the moderator, admin or owner roles.
A reason is required each time content is flagged by a member. Content is replaced by a feedback message and a link to the list of flagging reasons given by moderators when a moderation flagging threshold is reached. By default the threshold is of a single flag.
Right now is not possible to show the content of a thread or comment that has been hidden because of moderation, but future Boards2 versions might implement a way to handle moderation disputes and allow restoring the thread or comment content.
Boards2 realm
ownersare allowed to moderate content with a single flag within any board at this point, but this might be changed to work though a DAO proposal.
Each board's owner or admin members are free to change the flagging threshold within a single board to a
greater value using a public realm function:
1// SetFlaggingThreshold sets the number of flags required to hide a thread or comment
2func SetFlaggingThreshold(_ realm, boardID boards.ID, threshold int)
Members with the moderator, admin or owner roles are the only ones that are allowed to ban or unban
a user within a board.
Users can be banned with a reason for any number of hours. Within this period banned users are not allowed to interact or make any changes.
Only invited guest members and open board users can be banned, banning board owners, admins and moderators
is not allowed.
Banning and unbanning can be done by calling these public realm functions:
1// Ban bans a user from a board for a period of time
2func Ban(_ realm, boardID boards.ID, user address, hours uint, reason string)
3
4// Unban unbans a user from a board
5func Unban(_ realm, boardID boards.ID, user address, reason string)
Boards2 realm allows owner or admin members of a board to freeze the board or any of its threads.
Freezing makes the board or thread readonly, disallowing any changes or additions until unfrozen.
The following public realm function can be called for freezing:
1// FreezeBoard freezes a board so no more threads and comments can be created or modified
2func FreezeBoard(_ realm, boardID boards.ID)
3
4// UnfreezeBoard removes frozen status from a board
5func UnfreezeBoard(_ realm, boardID boards.ID)
6
7// FreezeThread freezes a thread so thread cannot be replied, modified or deleted
8func FreezeThread(_ realm, boardID, threadID boards.ID)
9
10// UnfreezeThread removes frozen status from a thread
11func UnfreezeThread(_ realm, boardID, threadID boards.ID)
Boards2 is a social discussion forum for open communication and community-driven conversations.
Users can start discussions by creating or reposting threads and then submitting comments or replies to other user comments.
Discussions happen within different boards, where each board is an independent self managed community.
Boards2 allows users to create two types of boards: - Invite Only: Only invited users (members) can create threads, reposts and comments. - Open: Anyone with a specific amount of GNOT in their account can create threads, reposts and comments.
List of Boards2 member roles.
1const (
2 PermissionBoardCreate boards.Permission = iota
3 PermissionBoardFlaggingUpdate
4 PermissionBoardFreeze
5 PermissionBoardRename
6 PermissionMemberInvite
7 PermissionMemberInviteRevoke
8 PermissionMemberRemove
9 PermissionPermissionsUpdate
10 PermissionRealmHelpChange
11 PermissionRealmLock
12 PermissionRealmNotice
13 PermissionAccountRequiredAmountChange
14 PermissionReplyCreate
15 PermissionReplyDelete
16 PermissionReplyFlag
17 PermissionRoleChange
18 PermissionThreadCreate
19 PermissionThreadDelete
20 PermissionThreadEdit
21 PermissionThreadFlag
22 PermissionThreadFreeze
23 PermissionThreadRepost
24 PermissionUserBan
25 PermissionUserUnban
26)List of Boards2 permissions.
1const (
2 // MaxBoardNameLength defines the maximum length allowed for board names.
3 MaxBoardNameLength = 50
4
5 // MaxThreadTitleLength defines the maximum length allowed for thread titles.
6 MaxThreadTitleLength = 100
7
8 // MaxThreadBodyLength defines the maximum length allowed for thread bodies.
9 // 40,000 mirrors Reddit's self-post body cap.
10 MaxThreadBodyLength = 40000
11
12 // MaxReplyLength defines the maximum length allowed for replies.
13 // 10,000 mirrors Reddit's comment cap.
14 MaxReplyLength = 10000
15)Constants for different banning periods.
DefaultFlaggingThreshold defines the default number of flags that hides flaggable items.
PermissionCustom defines an initial value for custom board permissions. When a board defines custom permissions it must starts from a value greater or equal than PermissionCustom.
Custom permissions definition example:
1var (
2 // RealmLink contains Boards2 realm link.
3 // It can be used to generate board TX links from other realms.
4 RealmLink = txlink.Realm(realmPkgPath)
5
6 // RequiredAccountAmount contains the required account amount for open board interactions.
7 // The amount requirement is not applied to members that were invited to an open board.
8 // Amount is defined as ugnot.
9 RequiredAccountAmount = int64(3_000_000_000)
10
11 // Notice contains an optional message that is displayed globally within the realm.
12 Notice string
13
14 // Help contains optional Markdown with Boards2 realm help.
15 Help string
16)AcceptInvite accepts a board invite request.
AreRealmMembersLocked checks if realm members have been locked.
Ban bans a user from a board for a period of time. Only invited guest members and external users can be banned. Banning board owners, admins and moderators is not allowed.
BoardCount returns the total number of boards.
ChangeMemberRole changes the role of a realm or board member.
Board ID is only required when changing the role for a member of a board.
CreateBoard creates a new board.
Listed boards are included in the realm's list of boards. Open boards allow anyone to create threads and comment.
CreateReply creates a new comment or reply within a thread.
The value of `replyID` is only required when creating a reply of another reply.
1func CreateRepost(cur realm, boardID, threadID, destinationBoardID boards.ID, title, body string) boards.IDCreateRepost reposts a thread into another board.
CreateThread creates a new thread within a board.
DeleteReply deletes a reply from a thread.
Replies can be deleted by the users who created them or otherwise by users with special permissions. Soft deletion is used when the deleted reply contains sub replies, in which case the reply content is replaced by a text informing that reply has been deleted to avoid deleting sub-replies.
DeleteThread deletes a thread from a board.
Threads can be deleted by the users who created them or otherwise by users with special permissions.
EditReply updates the body of a comment or reply.
Replies can be updated only by the users who created them.
EditThread updates the title and body of a thread.
Threads can be updated by the users who created them or otherwise by users with special permissions.
FlagReply adds a new flag to a comment or reply.
Flagging requires special permissions and hides the comment or reply when the number of flags reaches a pre-defined flagging threshold.
FlagThread adds a new flag to a thread.
Flagging requires special permissions and hides the thread when the number of flags reaches a pre-defined flagging threshold.
FreezeBoard freezes a board so no more threads and comments can be created or modified.
FreezeThread freezes a thread so thread cannot be replied, modified or deleted.
Fails if board is frozen.
GetBoard returns a board. This is a protected function only callable by Boards2 sub realms.
GetBoardIDFromName searches a board by name and returns its ID.
GetFlaggingThreshold returns the number of flags required to hide a thread or comment within a board.
GetRealmPermissions returns Boards2 realm permissions. This is a protected function only callable by Boards2 sub realms.
HasMemberRole checks if a realm or board member has a specific role assigned.
Board ID is only required when checking a member of a board.
InviteMember adds a member to the realm or to a board.
A role can optionally be specified to be assigned to the new member.
InviteMembers adds one or more members to the realm or to a board.
Board ID is only required when inviting a member to a specific board.
IsBanned checks if a user is banned from a board.
IsBoardFrozen checks if a board has been frozen.
IsMember checks if a user is a member of the realm or a board.
Board ID is only required when checking if a user is a member of a board.
IsRealmLocked checks if boards realm has been locked.
IsThreadFrozen checks if a thread has been frozen.
Returns true if board is frozen.
Iterate iterates boards. Iteration is done for all boards, including the ones that are not listed. To reverse iterate boards use a negative count. If the callback returns true, iteration is stopped.
LockRealm locks the realm making it readonly.
WARNING: Realm can't be unlocked once locked.
Realm can also be locked without locking realm members. Realm members can be locked when locking the realm or afterwards. This is relevant for two reasons, one so that members can be modified after the lock. The other is for realm owners, who can delete threads and comments after the lock.
MustGetBoard returns a board or panics on error. This is a protected function only callable by Boards2 sub realms.
RemoveMember removes a member from the realm or a board.
Board ID is only required when removing a member from board.
RenameBoard changes the name of an existing board.
A history of previous board names is kept when boards are renamed. Because of that boards are also accessible using previous name(s).
RequestInvite request to be invited to a board.
RevokeInvite revokes a board invite request.
SetFlaggingThreshold sets the number of flags required to hide a thread or comment.
Threshold is only applicable within the board where it's setted.
SetHelp sets or updates boards realm help content.
SetPermissions sets a permissions implementation for boards2 realm or a board.
SetRealmNotice sets a notice to be displayed globally within the realm. An empty message removes the realm notice.
SetRequiredAccountAmount sets the required account amount to interact as a non member with open boards. Amount must be given as ugnot. The amount requirement is not applied to members that were invited to an open board.
Unban unbans a user from a board.
UnfreezeBoard removes frozen status from a board.
UnfreezeThread removes frozen status from a thread.
Fails if board is frozen.
BoardMeta defines a type for board metadata.
Invite contains a user invitation.
ThreadMeta defines a type for thread metadata.