-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(orgs): split creation flows + add new kind of roles based organization #1429
Merged
n0izn0iz
merged 106 commits into
main
from
dev/mikaelvallenet/feat/push-role-manager-into-dao
Dec 5, 2024
Merged
Changes from 99 commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
e56ac5b
test: e2e test to create dao creation flow
MikaelVallenet 6860ec0
wip: e2e test to create dao creation flow
MikaelVallenet c04bea2
wip: e2e test handle filling all steps in dao creation form
MikaelVallenet 59680d9
wip: e2e test handle filling all steps in dao creation form
MikaelVallenet d3f01e3
Merge branch 'main' into e2e-test-dao-creation-gno
MikaelVallenet 83d31c8
wip: e2e test handle filling all steps in dao creation form
MikaelVallenet f5a55e2
wip: e2e test handle filling all steps in dao creation form
MikaelVallenet a020752
fix: remove unused std from gno dao realm generation
MikaelVallenet 7c60018
feat: add adena mock deploy pkg function
MikaelVallenet e4f4b20
fix: finish e2e test organization creation flow on gno
MikaelVallenet 21567e5
chore: refactor project structure by moving all e2e test files into g…
MikaelVallenet 9b8a071
style: run eslint
MikaelVallenet 03f1e7c
revert: useless modification on e2e test
MikaelVallenet cdc95c3
fix: delete useless pkg comment
MikaelVallenet c0eb78c
fix: run lint on networks files
MikaelVallenet 2ec5b9e
Merge branch 'main' into e2e-test-dao-creation-gno
MikaelVallenet c3516ce
fix: delete useless console.log
MikaelVallenet dcd664e
feat: use enum to handle adena type message value
MikaelVallenet 55176c8
fix: delete mint & burn tori token for common dao
MikaelVallenet ca2b6f1
Merge branch 'main' into e2e-test-dao-creation-gno
n0izn0iz b0cf985
fix(dao): remove modboard related code
MikaelVallenet 5093189
Merge branch 'e2e-test-dao-creation-gno' of github.com:TERITORI/terit…
MikaelVallenet c3899dd
Merge branch 'main' into e2e-test-dao-creation-gno
MikaelVallenet ff5bca0
fix(gnovm): remove leftover of tori import
MikaelVallenet 5caf06f
feat: add a call to members JSON
MikaelVallenet ed52b3f
feat: add a call to members JSON
MikaelVallenet 0fa0a0a
fix: remove tori admin handler
MikaelVallenet 4e08f27
chore: run eslint
MikaelVallenet fce1b40
fix: add a TODO to fix later the groupId
MikaelVallenet ca673e0
fix: remove groupId
MikaelVallenet 8be6a98
fix: keep only e2e related code
MikaelVallenet 010420e
fix: keep only e2e related code
MikaelVallenet d9cd564
Merge branch 'main' into e2e-test-dao-creation-gno
MikaelVallenet c6801b3
fix(gno-daos): create proposal for post with DAO
MikaelVallenet 3d27a0c
feat(dao): fix org on gno to post on social feed
MikaelVallenet 49bce88
feat(dao): fix org on gno to post on social feed
MikaelVallenet e15b6b6
feat(dao): fix not enough funds by using user wallet instead of contr…
MikaelVallenet 2885aa9
misc(dao): remove console log statements
MikaelVallenet ce5aac9
fix(dao): vote value
MikaelVallenet 7f0de1c
chore: lint
MikaelVallenet 4954bb8
chore: gno lint
MikaelVallenet 95633d4
chore: gno lint
MikaelVallenet 7eedca8
chore: gno lint
MikaelVallenet 9b2d5ba
fix: replace function by usage of lodash lib
MikaelVallenet 03d2edb
fix: check dao have enough money
MikaelVallenet ec11c14
fix: look for balance of DAO not of user
MikaelVallenet 2088df2
fix: remove double wait on tx causing infinite waiting time
MikaelVallenet 53793c3
fix: parse user & network
MikaelVallenet 117295a
fix: simplify ternary operation
MikaelVallenet e6547dd
Merge branch 'main' into dev/mikaelvallenet/fix/organization-posting-…
MikaelVallenet fec6e90
Merge branch 'main' into dev/mikaelvallenet/feat/register-dao-to-prof…
MikaelVallenet d368965
feat(gno/dao): regiser dao conf to profile realm
MikaelVallenet 30f69f6
chore: rename poster to author
MikaelVallenet 3dee11a
Merge branch 'main' into dev/mikaelvallenet/fix/organization-posting-…
MikaelVallenet 656b087
Merge branch 'dev/mikaelvallenet/fix/organization-posting-post' into …
MikaelVallenet cb0c544
fix(gno/dao): display dao members
MikaelVallenet 513d6c3
fix(gno/dao): merge main
MikaelVallenet ee26a23
Merge branch 'dev/mikaelvallenet/feat/register-dao-to-profile-realm' …
MikaelVallenet 2efbcf5
fix(gno/dao): delete fakeRoles
MikaelVallenet 52e1f49
fix(gno/dao): run linter
MikaelVallenet ad36970
feat(gno/dao): add dao_roles_group
MikaelVallenet 0055bda
feat(gno/dao): add dao_roles_group
MikaelVallenet 6a15018
feat(gno/dao): implement role manager into daos realms
MikaelVallenet 9852985
tests(gno/dao): add roles module in test dao core
MikaelVallenet 7686f09
tests(gno/dao): add roles modules info
MikaelVallenet 9cc37d6
feat(gno/dao): add dao_roles_group into network objects
MikaelVallenet e92bc8f
chore(gno/dao): generate networks.json
MikaelVallenet 629a6d1
feat(gno/dao): add dao roles group into generated dao code
MikaelVallenet ec2e57f
feat(gno/dao): add dao_roles_group into network objects
MikaelVallenet 3efeae5
feat(gno/dao): add example of role creation & assignment in dao_core
MikaelVallenet 901146d
feat(gno/dao): add form section to add new role into dao
MikaelVallenet 8d21e7d
feat(gno/dao): add review collapsable row for roles settings definition
MikaelVallenet 3904387
fix(gno/dao): handle unregister field value when delete role or member
MikaelVallenet ccbf26c
fix(gno/dao): add field to assign roles to users
MikaelVallenet e928bbb
fix(gno/dao): add role & assignment to deployment contract
MikaelVallenet d8c1b8c
feat(gno/dao): retrive roles from members of the DAO
MikaelVallenet 206021a
feat(gno/dao): display roles of DAO members
MikaelVallenet d957c11
chore: merge w/ main
MikaelVallenet 4131ab2
fix: e2e test
MikaelVallenet b755fef
feat: merge main
MikaelVallenet 438d0fb
tests: fix gno dao tests
MikaelVallenet 4c81982
chore: run linter on e2e tests
MikaelVallenet 841ef7e
feat: refactor organizations and slit each flow
MikaelVallenet c5317f1
Update packages/screens/Organizations/components/CreateDAOSection.tsx
MikaelVallenet a77163b
fix: add flex property create dao animation
MikaelVallenet 5fddbc0
Merge branch 'dev/mikaelvallenet/feat/push-role-manager-into-dao' of …
MikaelVallenet ca3b5c1
fix: refactor gno e2e tests
MikaelVallenet 607cebe
fix: remove roles e2e test since it's not production ready
MikaelVallenet b549bbc
chore: run lint
MikaelVallenet 0ccbc60
fix: reset unlocked steps on structure change
MikaelVallenet c0e7c6a
test: fix e2e tests
MikaelVallenet 4284bef
test: fix e2e tests
MikaelVallenet ce2571f
chore: regenerate networks.json
MikaelVallenet 21012de
fix(org): remove unused ReviewInformationSection component
MikaelVallenet 7695414
fix(org): remove duplicate register to realm profile
MikaelVallenet 637d03a
style: remove stylesheet.create from evertwhere in the orgs screens &…
MikaelVallenet 7eeb6ba
fix(org): fix split bug & add split member in two kind for roles & me…
MikaelVallenet 4acc804
fix(org): fix deploy roles based dao without any roles
MikaelVallenet 3d5061b
fix(org/upp): remove roles text if user card does not have any roles
MikaelVallenet b3de18d
Merge branch 'main' into dev/mikaelvallenet/feat/push-role-manager-in…
n0izn0iz 5480428
feat: add token based dao
MikaelVallenet 0add3e8
fix: import
MikaelVallenet 9ea0010
chore: lint
MikaelVallenet 928814e
chore: lint
MikaelVallenet 1f77d9a
Merge branch 'main' into dev/mikaelvallenet/feat/push-role-manager-in…
MikaelVallenet 9f9df32
fix: e2e test
MikaelVallenet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
cypress/e2e/gno/organization-creation.cy.ts → ...ns/membership-organization-creation.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cypress/e2e/gno/upp-form.cy.ts → cypress/e2e/gno/upp/upp-form.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module gno.land/p/teritori/dao_roles_group | ||
|
||
require ( | ||
gno.land/p/demo/json v0.0.0-latest | ||
gno.land/p/teritori/dao_interfaces v0.0.0-latest | ||
gno.land/p/teritori/jsonutil v0.0.0-latest | ||
gno.land/p/teritori/role_manager v0.0.0-latest | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package dao_roles_group | ||
|
||
import ( | ||
"std" | ||
|
||
"gno.land/p/demo/json" | ||
dao_interfaces "gno.land/p/teritori/dao_interfaces" | ||
"gno.land/p/teritori/jsonutil" | ||
"gno.land/p/teritori/role_manager" | ||
) | ||
|
||
type RolesGroup struct { | ||
dao_interfaces.IRolesModule | ||
|
||
rm *role_manager.RoleManager | ||
} | ||
|
||
func NewRolesGroup() *RolesGroup { | ||
return &RolesGroup{ | ||
rm: role_manager.NewWithAddress(std.PrevRealm().Addr()), | ||
} | ||
} | ||
|
||
func (r *RolesGroup) Info() dao_interfaces.ModuleInfo { | ||
return dao_interfaces.ModuleInfo{ | ||
Kind: "gno/p/teritori/dao_roles_group", | ||
Version: "0.1.0", | ||
} | ||
} | ||
|
||
func (r *RolesGroup) ConfigJSON() string { | ||
return json.ObjectNode("", map[string]*json.Node{ | ||
"totalRoles": jsonutil.IntNode(r.rm.CountRoles()), | ||
}).String() | ||
} | ||
|
||
func (r *RolesGroup) Render(path string) string { | ||
return "Not implemented yet" | ||
} | ||
|
||
func (r *RolesGroup) HasRole(address std.Address, role string) bool { | ||
return r.rm.HasRole(address, role) | ||
} | ||
|
||
func (r *RolesGroup) NewRole(roleName string) { | ||
r.rm.CreateNewRole(roleName, []string{}) | ||
} | ||
|
||
func (r *RolesGroup) DeleteRole(roleName string) { | ||
r.rm.DeleteRole(roleName) | ||
} | ||
|
||
func (r *RolesGroup) GrantRole(address std.Address, role string) { | ||
r.rm.AddRoleToUser(address, role) | ||
} | ||
|
||
func (r *RolesGroup) RevokeRole(address std.Address, role string) { | ||
r.rm.RemoveRoleFromUser(address, role) | ||
} | ||
|
||
func (r *RolesGroup) GetMemberRoles(address std.Address) []string { | ||
return r.rm.GetUserRoles(address) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO, it could be nice and more practice if we handle AddressOrName instead of only Address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree, if we do we have to add a way to resolve users by passing a resolver in the role module, increasing gas cost, dependencies and complexity
then if at some point usernames can change, we get a lot of headache
IMO it's better to always operate on addresses where possible