(self, url, requester_user)
| 106 | return self._hooks.get_all() |
| 107 | |
| 108 | def get_one(self, url, requester_user): |
| 109 | triggers = self._hooks.get_triggers_for_hook(url) |
| 110 | |
| 111 | if not triggers: |
| 112 | abort(http_client.NOT_FOUND) |
| 113 | return |
| 114 | |
| 115 | permission_type = PermissionType.WEBHOOK_VIEW |
| 116 | rbac_utils = get_rbac_backend().get_utils_class() |
| 117 | rbac_utils.assert_user_has_resource_db_permission( |
| 118 | user_db=requester_user, |
| 119 | resource_db=WebhookDB(name=url), |
| 120 | permission_type=permission_type, |
| 121 | ) |
| 122 | |
| 123 | # For demonstration purpose return 1st |
| 124 | return triggers[0] |
| 125 | |
| 126 | def post(self, hook, webhook_body_api, headers, requester_user): |
| 127 | body = webhook_body_api.data |
nothing calls this directly
no test coverage detected