Skip to content

Commit

Permalink
Fix/SK-1325 | JWT role "admin" -> "client" for client endpoints (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminastrand authored Jan 24, 2025
1 parent 1e538f7 commit f54e01e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fedn/network/api/v1/client_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def delete_client(id: str):


@bp.route("/add", methods=["POST"])
@jwt_auth_required(role="admin")
@jwt_auth_required(role="client")
def add_client():
"""Add client
Adds a client to the network.
Expand Down
5 changes: 2 additions & 3 deletions fedn/network/api/v1/package_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

from fedn.common.config import FEDN_COMPUTE_PACKAGE_DIR
from fedn.network.api.auth import jwt_auth_required
from fedn.network.api.shared import control
from fedn.network.api.shared import control, package_store, repository
from fedn.network.api.shared import get_checksum as _get_checksum
from fedn.network.api.shared import package_store, repository
from fedn.network.api.v1.shared import api_version, get_post_data_to_kwargs, get_typed_list_headers
from fedn.network.storage.statestore.stores.shared import EntityNotFound

Expand Down Expand Up @@ -573,7 +572,7 @@ def upload_package():


@bp.route("/download", methods=["GET"])
@jwt_auth_required(role="admin")
@jwt_auth_required(role="client")
def download_package():
"""Download package
Downloads a package based on the provided id.
Expand Down

0 comments on commit f54e01e

Please sign in to comment.