diff options
| author | Frederick Muriuki Muriithi | 2023-02-02 14:15:29 +0300 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2023-02-02 14:15:29 +0300 |
| commit | ecce454ca9d0f374e22da8401206e3b1695dbded (patch) | |
| tree | 70db9cc60df565336b7c37103b39a2d92183d764 /gn3/auth/authorisation/resources | |
| parent | dfe5eb18e3ec8dc570d118bfe95c5d4dcb2c7575 (diff) | |
| download | genenetwork3-ecce454ca9d0f374e22da8401206e3b1695dbded.tar.gz | |
auth: Improve authorisation
Retrieve the token, and user in the authorisation decorator to enable checking of privileges.
Diffstat (limited to 'gn3/auth/authorisation/resources')
| -rw-r--r-- | gn3/auth/authorisation/resources/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gn3/auth/authorisation/resources/models.py b/gn3/auth/authorisation/resources/models.py index 1959362..8d45ef4 100644 --- a/gn3/auth/authorisation/resources/models.py +++ b/gn3/auth/authorisation/resources/models.py @@ -47,7 +47,8 @@ class Resource(NamedTuple): } @authorised_p(("group:resource:create-resource",), - error_message="Could not create resource") + error_description="Insufficient privileges to create a resource", + oauth2_scope="profile resource") def create_resource( conn: db.DbConnection, resource_name: str, resource_category: ResourceCategory) -> Resource: |
