| @@ -7,10 +7,9 @@ | ||
| 7 | 7 | |
| 8 | 8 | abstract class Controller extends BaseController |
| 9 | 9 | { |
| 10 | 10 | /** |
| 11 | - * Ensure the current agent has at least one ticket management permission. | |
| 12 | - * Draft-only agents (fst_draft_reply only) cannot perform mutating actions. | |
| 11 | + * Draft-only agents (fst_draft_reply) can't perform mutating actions. | |
| 13 | 12 | * |
| 14 | 13 | * @throws \Exception |
| 15 | 14 | */ |
| 16 | 15 | protected function ensureCanManageTickets() |
| @@ -24,9 +23,9 @@ | ||
| 24 | 23 | ); |
| 25 | 24 | } |
| 26 | 25 | |
| 27 | 26 | /** |
| 28 | - * Ensure the current agent can access the given ticket based on visibility level. | |
| 27 | + * Enforces the agent's ticket visibility level. | |
| 29 | 28 | * |
| 30 | 29 | * @param object $ticket |
| 31 | 30 | * @throws \Exception |
| 32 | 31 | */ |
| @@ -36,8 +35,9 @@ | ||
| 36 | 35 | return; |
| 37 | 36 | } |
| 38 | 37 | |
| 39 | 38 | throw new \Exception( |
| 40 | - esc_html__('Sorry, You do not have permission to this ticket', 'fluent-support') | |
| 39 | + esc_html__('Sorry, You do not have permission to this ticket', 'fluent-support'), | |
| 40 | + 403 | |
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | } |