Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + gno.land: a blockchain for timeless code and fair open-source.
Board creation is a fundamental operation in r/boards, requiring role-based permission checks to ensure that only authorized users can create boards. Initially, this logic will not depend on an external DAO but will integrate with the DefaultPermissions struct for access control. The board creation logic must include validation of board names, prevention of conflicts with existing usernames in the users realm, and adherence to naming rules.
Acceptance Criteria:
[ ] Provides a CreateBoard function that validates user permissions.
Context:
Board creation is a fundamental operation in
r/boards
, requiring role-based permission checks to ensure that only authorized users can create boards. Initially, this logic will not depend on an external DAO but will integrate with theDefaultPermissions
struct for access control. The board creation logic must include validation of board names, prevention of conflicts with existing usernames in theusers
realm, and adherence to naming rules.Acceptance Criteria:
[ ] Provides a
CreateBoard
function that validates user permissions.Example
```go func (bp *BoardsRealm) CreateBoard(user User, boardName string) { bp.WithPermission(user, "create", []interface{}{boardName}, func(args []interface{}) { // Actual board creation logic board := NewBoard(boardName, user) bp.boards[boardName] = board }) } ```Owner
,Admin
) can create a board.users
realm and ensure naming conventions.DefaultPermissions
to manage board creation validation and user roles.