Skip to content
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

New channel permissions helper #293

Merged
merged 4 commits into from
Mar 12, 2024
Merged

New channel permissions helper #293

merged 4 commits into from
Mar 12, 2024

Conversation

zuuring
Copy link
Member

@zuuring zuuring commented Mar 5, 2024

Notes

This commit adds a new channel-management helper to Valkyrie which will always ensure permissions on new channels within the defense category are assigned to the same permission set as the base channel category permissions.

It then sends a message to the newly created channel, listing the permissions and access levels they have for quick verification on channel permissions.

If the channel is created with different permissions than base category, it will be overwritten by the permissions on base category. However, permissions can also be altered after creation if needed manually.

Screenshot

Screenshot 2024-03-05 at 11 04 56

This commit adds a new `channel-management` helper to Valkyrie which will always ensure permissions on new channels within the `defense` category are assigned to the same permission set as the channel category permissions.

It then sends a message to the newly created channel, listing the permissions and access levels they have.
@zuuring zuuring requested a review from Shadowfiend March 5, 2024 09:23
@zuuring zuuring marked this pull request as ready for review March 6, 2024 07:40
@zuuring
Copy link
Member Author

zuuring commented Mar 8, 2024

Also marking this one ready to review, if we want to get the permission mapper for #defense cat pushed before our next release.

Shadowfiend
Shadowfiend previously approved these changes Mar 11, 2024
Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty much good to go.

I will leave it up to you if you want to merge & then address in one of the following PRs, or if you want to address & then we merge.

discord-scripts/channel-management.ts Outdated Show resolved Hide resolved
discord-scripts/channel-management.ts Outdated Show resolved Hide resolved
discord-scripts/channel-management.ts Outdated Show resolved Hide resolved
@Shadowfiend Shadowfiend mentioned this pull request Mar 11, 2024
- Removes list of permissions sent to channel
- Changes defense to load from specific channel id. You must setup env `DEFENSE_CATEGORY_ID` to have it function correctly.
- Merges into one function
@zuuring
Copy link
Member Author

zuuring commented Mar 11, 2024

@Shadowfiend Thanks for the review comments and have now fixed this up so it's ready to be merged. Just need to add env DEFENSE_CATEGORY_ID beforehand.

Comment on lines +9 to +10
if (process.env.DEFENSE_CATEGORY_ID) {
if (application) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to nest, these can combine into one.

Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a commit with the kube config updates. Let's do it.

@Shadowfiend Shadowfiend merged commit baa80c9 into main Mar 12, 2024
6 checks passed
@Shadowfiend Shadowfiend deleted the channel-permissions-set branch March 12, 2024 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants