Anyone can add an invite code to the contract, like this
addinvite(enroller name, dao name, code checksum256)
Anyone can claim invite
claim(account name, code checksum 256)
This checks the code, pulls enroller and dao from that, triggers a call to autoenroll on dao.hypha
autorneoll(enroller, dao, account)
dao.hypha checks if enroller has enroll rights on the dao, and enrolls the member if yes.
fails if not.
Permissions Changes
new permission autoenroll, subset of active, on dao.hypha
join.hypha gets this permission on its own eosio.code permission
autoenroll is limited to the autoenroll function on dao.hypha
join.hypha changes
table with enroller, dao, code
action addinvite and claiminvite - checks enroller active permission proving that account called it
claiminvite checks account permission active, and checks the secret vs the code - the code is hashed, see seeds how to do this.
dao.hypha changes
add autoenroll action - there already is one, modify if needed.
Wallet change
Wallet gets secret, sends secret to join.hypha's claim action
Add auto enroll to join.hypha
It works as follows:
Anyone can add an invite code to the contract, like this
addinvite(enroller name, dao name, code checksum256)
Anyone can claim invite
claim(account name, code checksum 256)
This checks the code, pulls enroller and dao from that, triggers a call to autoenroll on dao.hypha
autorneoll(enroller, dao, account)
dao.hypha checks if enroller has enroll rights on the dao, and enrolls the member if yes.
fails if not.
Permissions Changes
join.hypha changes
table with enroller, dao, code action addinvite and claiminvite - checks enroller active permission proving that account called it claiminvite checks account permission active, and checks the secret vs the code - the code is hashed, see seeds how to do this.
dao.hypha changes
add autoenroll action - there already is one, modify if needed.
Wallet change
Wallet gets secret, sends secret to join.hypha's claim action