reviewboard.notifications.models¶
- class WebHookTarget(*args, **kwargs)[source]¶
A target for a webhook.
A webhook target is a URL which will receive a POST request when the corresponding event occurs.
- is_accessible_by(user, local_site=None)[source]¶
Return if the webhook can be accessed or modified by the user.
All superusers and admins of the webhook’s local site can access and modify the webhook.
- Parameters
user (django.contrib.auth.models.User) – The user who is trying to access the webhook.
local_site (reviewboard.site.models.LocalSite) – The current local site, if it exists.
- Returns
Whether or not the given user can access or modify the webhook through the given local site.
- Return type