@is_package_page
@is_api_authd
def create_release(token, package):
+ if not package.checkPerm(token.owner, Permission.APPROVE_RELEASE):
+ return error(403, "You do not have the permission to approve releases")
+
json = request.json
if json is None:
return error(400, "JSON post data is required")
return error(403, "Invalid authentication, couldn't validate API token")
if not package.checkPerm(actual_token.owner, Permission.APPROVE_RELEASE):
- return error(403, "Only trusted members can use webhooks")
+ return error(403, "You do not have the permission to approve releases")
#
# Check event
return error(403, "Invalid authentication")
if not package.checkPerm(token.owner, Permission.APPROVE_RELEASE):
- return error(403, "Only trusted members can use webhooks")
+ return error(403, "You do not have the permission to approve releases")
#
# Check event
3. The git host posts a webhook notification to ContentDB, using the API token assigned to it.
4. ContentDB checks the API token and issues a new release.
-<p class="alert alert-info">
- This feature is in beta, and is only available for Trusted Members.
-</p>
-
## Setting up
### GitHub (automatic)