PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.1.1
Fluent Support – Helpdesk & Customer Support Ticket System v2.1.1
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
← All changes | app/Models/MailBox.php +0 -32 trunk2.1.1 View file →
@@ -2,9 +2,8 @@
2 2
3 3 namespace FluentSupport\App\Models;
4 4
5 5 use Exception;
6 -use FluentSupport\App\Modules\PermissionManager;
7 6 use FluentSupport\App\Services\EmailNotification\Settings;
8 7 use FluentSupport\App\Services\Helper;
9 8 use FluentSupport\Framework\Support\Arr;
10 9
@@ -55,39 +54,8 @@
55 54 return Helper::safeUnserialize($this->attributes['settings']);
56 55 }
57 56
58 57 return [];
59 - }
60 -
61 - /**
62 - * Returns the mailboxes the current agent is allowed to know about.
63 - *
64 - * Restricted inboxes are filtered out, so the `settings` blob only ever describes
65 - * an inbox the agent already works in. Note that the restriction list is the only
66 - * gate here: an agent with no restrictions receives `settings` — including
67 - * `admin_email_address` — for every inbox, regardless of their other permissions.
68 - *
69 - * @param bool $withEmail Include the inbox address. Only pass true once the caller
70 - * has confirmed the current user holds `fst_sensitive_data`.
71 - * @return \FluentSupport\Framework\Database\Orm\Collection
72 - */
73 - public static function getAccessibleBoxes($withEmail = false)
74 - {
75 - $columns = ['id', 'name', 'settings'];
76 -
77 - if ($withEmail) {
78 - $columns[] = 'email';
79 - }
80 -
81 - $query = MailBox::select($columns);
82 -
83 - $restrictedBoxes = PermissionManager::getRestrictedMailboxIds();
84 -
85 - if ($restrictedBoxes) {
86 - $query->whereNotIn('id', $restrictedBoxes);
87 - }
88 -
89 - return $query->get();
90 58 }
91 59
92 60 public static function slugify($title)
93 61 {