reviewboard.notifications.managers¶
- class WebHookTargetManager(*args, **kwargs)[source]¶
Bases:
Manager
Manages WebHookTarget models.
This provides a utility function for querying WebHookTargets for a given event.
- for_event(event, local_site_id=None, repository_id=None)[source]¶
Returns a list of matching webhook targets for the given event.
- for_local_site(local_site=None)[source]¶
Return a list of webhooks on the local site.
- Parameters:
local_site (
reviewboard.site.models.LocalSite
) – An optional local site.- Returns:
A queryset matching all accessible webhooks.
- Return type:
- can_create(user, local_site=None)[source]¶
Return whether the user can create webhooks on the local site.
- Parameters:
user (
django.contrib.auth.models.User
) – The user to check for permissions.local_site (
reviewboard.site.models.LocalSite
) – The current local site, if it exists.
- Returns:
Whether or not the use can create a webhook on the local site.
- Return type:
- __annotations__ = {}¶
- __slotnames__ = []¶