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.
Renaming a board requires strict permission checks and coordination with moderation policies. The renaming process must ensure that board names do not conflict with usernames in the users realm and must follow specific rules. Only authorized roles such as board Owner and Admin should be able to initiate a rename operation.
Acceptance Criteria:
[ ] Implements a RenameBoard function that validates user permissions.
Context:
Renaming a board requires strict permission checks and coordination with moderation policies. The renaming process must ensure that board names do not conflict with usernames in the
users
realm and must follow specific rules. Only authorized roles such as boardOwner
andAdmin
should be able to initiate a rename operation.Acceptance Criteria:
[ ] Implements a
RenameBoard
function that validates user permissions.Example
```go bp.WithPermission(user, "rename", []interface{}{oldName, newName}, func(args []interface{}) { // Renaming logic }) ```[ ] Ensures that only board owners or admins can rename a board.
[ ] Integrates board name conflict checks with the
users
realm to avoid duplication.[ ] Implements a mechanism for tracking and displaying historical board names.
[ ] Provides a callback for future DAO integration to handle name validation and approval.
Example
```go func (bp *DefaultPermissions) RenameBoard(user Address, oldName string, newName string) error { return bp.WithPermission(user, "rename:board", []interface{}{oldName, newName}, func(args []interface{}) { if IsNameConflictWithUsersRealm(newName) { panic("New board name conflicts with an existing username") } board := GetBoardByName(oldName) if board == nil { panic("Board not found") } board.Name = newName UpdateBoard(board) }) } ```[ ] Integrates mechanisms to handle name change lookups to allow users to find boards by previous names.
[ ] Ensures renaming history is maintained to support board lookup by old names.
[ ] Includes validation to restrict
Admin
from renaming a board without proper authorization.