]> git.lizzy.rs Git - cheatdb.git/commitdiff
Correct documentation on users allowed to use webhooks
authorrubenwardy <rw@rubenwardy.com>
Tue, 21 Apr 2020 18:27:34 +0000 (19:27 +0100)
committerrubenwardy <rw@rubenwardy.com>
Tue, 21 Apr 2020 18:27:34 +0000 (19:27 +0100)
app/blueprints/api/endpoints.py
app/blueprints/github/__init__.py
app/blueprints/gitlab/__init__.py
app/flatpages/help/release_webhooks.md

index 057cb7a284cefdb900a7cec7752020b43e1886a5..7c7a44a79bef47fa348994de0c604302efab01f2 100644 (file)
@@ -140,6 +140,9 @@ def markdown():
 @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")
index a07920cdad853e0a36202a15116e368eb4640074..2eb4f64c9e371716aa0050e0efc9724f0410b4f5 100644 (file)
@@ -124,7 +124,7 @@ def webhook():
                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
index 45b4aa59cfb0d09a5655c3cac60ac1a47517750f..84061d7dc4f8aa93936db87570005bfce718be7c 100644 (file)
@@ -44,7 +44,7 @@ def webhook():
                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
index 2d751a5a3f0a47be7ae818fc1bed1a37166b24f2..438226e7ad8aa88907ef01eaf24350a8e07832ef 100644 (file)
@@ -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.
 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)