-
Notifications
You must be signed in to change notification settings - Fork 389
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(boards2): member role management #3512
feat(boards2): member role management #3512
Conversation
This allows to create the default permissions with an empty DAO, simplifying permissions initialization and removing some redundancy.
Both initializations are similar but the permissions are different, for example board creation doesn't exist in board DAOs. Other super DAO permissions won't exist in board DAOs.
🛠 PR Checks Summary🔴 Maintainers must be able to edit this pull request (more info) Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🔴 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
@x1unix this PR is ready for review 🙏 |
func (dp DefaultPermissions) Roles() []Role { | ||
var roles []Role | ||
if dp.superRole != "" { | ||
roles = append(roles, dp.superRole) | ||
} | ||
|
||
dp.roles.Iterate("", "", func(name string, _ interface{}) bool { | ||
roles = append(roles, Role(name)) | ||
return false | ||
}) | ||
return roles | ||
} |
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.
Removed Roles()
because it's not being used anymore
admindao.New(admindao.WithMember(owner)), | ||
admindao.New(), |
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.
Removed member initialization because WithUser(owner, RoleOwner)
now adds the user to the DAO if it's not a member.
Resolves #3171