Review Listeners validating user Roles #57
Labels
No labels
Automated
Backlog
Post_Prototype_1.0
Bot_Code
Core
Bot_Code
Custom
CI/CD
Complexity
Advanced
Complexity
Basic
Complexity
Expert
Complexity
Intermediate
Kind/Breaking
Kind/Bug
Kind/Bug Fix
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Nix
Ownership
Collab
Ownership
Collab with Leads
Ownership
Individual Lead
Ownership
In-Review
Ownership
Needs Owner > May Delegate
Ownership
Workshop with Leads
Phase 1.0
Requirements > Drafting
Phase 1.0
Requirements > Researching
Phase 1.0
Requirements > Review & Planning
Phase 2.0
Design > Research & Analysis
Phase 3.0
Coding > Implementation
Phase 4.0
QA > Unit Testing & Design
Phase 5.0
Resolution > Completed
Phase 5.0
Resolution > Review for Completion
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: modulatingforce/forcebot_rs#57
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I believe I wanted the roles validation primarily for commands . I think I also wanted it to validate anything coming from routines or listeners to ensure the user has appropriately roles to send between channels.
However, I didn't intend for this to validate at listener level
I need to flesh this out a bit though on what would be recommended
When I think about it , I think the following may be best in terms of
Listener
, but would apply to allBotAction
:Chat
message is sent to the Source Channel ,Chat.say()
should Allow the Send to go without Additional User Access ValidationBotCommand
is already user access permissible at that channel level before theBotCommand
is ran, so this check would be redundant when checking against Source ChannelThe change would probably be made somewhere after this point
[x] !! => 03.24 - Would be nice if around here , validate the user has at least some special roles in target channel
Here in
Chat.botmsg()
specifically it can be Source channel can be checked (ofc, whatever needs to unwrap the Source channel needs to be done first)https://git.flake.sh/modulatingforce/forcebot_rs/src/branch/main/src/core/chat.rs#L254-L257
// If the BotMsg a Say/SayInReplyTo (from Developer or Chatter) , and the Sender does not have Specific Roles in the Source Channel Sent
to