-
Notifications
You must be signed in to change notification settings - Fork 118
TF-4392 [Team Mailbox] Delete email in Trash #4416
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,18 @@ extension PresentationMailboxExtension on PresentationMailbox { | |
|
|
||
| bool get isVirtualFolder => isFavorite || isActionRequired; | ||
|
|
||
| bool get isTrash => role == PresentationMailbox.roleTrash; | ||
| bool get isTrash { | ||
| if (isPersonal) { | ||
| return role == PresentationMailbox.roleTrash; | ||
| } else { | ||
| return isTrashTeamMailbox; | ||
| } | ||
| } | ||
|
|
||
| bool get isTrashTeamMailbox { | ||
| return isChildOfTeamMailboxes && | ||
| name?.name.toLowerCase() == PresentationMailbox.trashRole.toLowerCase(); | ||
| } | ||
|
Comment on lines
+43
to
+54
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 52 only checks 🤖 Prompt for AI Agents |
||
|
|
||
| bool get isDrafts => role == PresentationMailbox.roleDrafts; | ||
|
|
||
|
|
||
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.
Enforce
mayRemoveItemsinsideemptyTrashFolderAction.Lines 1839-1869 resolve and execute against any trash mailbox, but never verify
trashFolder.myRights?.mayRemoveItems == true.lib/features/mailbox/presentation/mixin/mailbox_widget_mixin.dartstill addsMailboxActions.emptyTrashfor default trash mailboxes without that guard, so some callers can reach this path and only fail after the server rejects the request. Add the permission check here as the final gate.🤖 Prompt for AI Agents