mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-23 02:32:28 +01:00
Correct documentation on users allowed to use webhooks
This commit is contained in:
@ -140,6 +140,9 @@ def markdown():
|
|||||||
@is_package_page
|
@is_package_page
|
||||||
@is_api_authd
|
@is_api_authd
|
||||||
def create_release(token, package):
|
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
|
json = request.json
|
||||||
if json is None:
|
if json is None:
|
||||||
return error(400, "JSON post data is required")
|
return error(400, "JSON post data is required")
|
||||||
|
@ -124,7 +124,7 @@ def webhook():
|
|||||||
return error(403, "Invalid authentication, couldn't validate API token")
|
return error(403, "Invalid authentication, couldn't validate API token")
|
||||||
|
|
||||||
if not package.checkPerm(actual_token.owner, Permission.APPROVE_RELEASE):
|
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
|
# Check event
|
||||||
|
@ -44,7 +44,7 @@ def webhook():
|
|||||||
return error(403, "Invalid authentication")
|
return error(403, "Invalid authentication")
|
||||||
|
|
||||||
if not package.checkPerm(token.owner, Permission.APPROVE_RELEASE):
|
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
|
# Check event
|
||||||
|
@ -17,10 +17,6 @@ The process is as follows:
|
|||||||
3. The git host posts a webhook notification to ContentDB, using the API token assigned to it.
|
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.
|
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
|
## Setting up
|
||||||
|
|
||||||
### GitHub (automatic)
|
### GitHub (automatic)
|
||||||
|
Reference in New Issue
Block a user