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.
To support flexible board governance, DefaultPermissions must implement role and membership management that allows for both traditional user-based ownership and autonomous board operation. The system should support boards becoming ownerless while maintaining functional governance through admins, with clear pathways for both immediate actions and proposal-based changes.
Acceptance Criteria:
[ ] DefaultPermissions includes flexible role management:
Example
```go
type DefaultPermissions struct {
RoleMappings map[string][]Address
MemberSet []Address
AdminInstance Address
ModerationConfig map[string]int
}
```
[ ] Role management methods support ownerless boards:
Context:
To support flexible board governance,
DefaultPermissions
must implement role and membership management that allows for both traditional user-based ownership and autonomous board operation. The system should support boards becoming ownerless while maintaining functional governance through admins, with clear pathways for both immediate actions and proposal-based changes.Acceptance Criteria:
[ ]
DefaultPermissions
includes flexible role management:Example
```go type DefaultPermissions struct { RoleMappings map[string][]Address MemberSet []Address AdminInstance Address ModerationConfig map[string]int } ```[ ] Role management methods support ownerless boards:
Example
```go func (dp *DefaultPermissions) HasPermission(user Address, action string, args []interface{}) bool { if len(dp.RoleMappings["owner"]) == 0 { if isRestrictedAction(action) { return dp.hasAdminConsensus(action, args) } } roles := dp.GetRolesForUser(user) return dp.canPerformAction(roles, action, args) } ```[ ] Supports autonomous board operation:
[ ] Implements role hierarchy enforcement:
[ ] Adds support for proposal-based role management:
Example
```go func (dp *DefaultPermissions) WithPermission(user Address, action string, args []interface{}, callback func([]interface{})) error { if !dp.HasPermission(user, action, args) { if dp.requiresProposal(user, action) { return dp.createProposal(user, action, args, callback) } return errors.New("permission denied") } callback(args) return nil } ```