1
0
mirror of https://github.com/quay/quay.git synced 2025-11-17 23:02:34 +03:00

ui: add entry for robot federation config (PROJQUAY-8050) (#3316)

* ui: add entry for robot federation config (PROJQUAY-8050)

adding entry for showing description in the UI for robot federation config changes
This commit is contained in:
Syed Ahmed
2024-10-15 11:25:36 -04:00
committed by GitHub
parent d39a6f06c3
commit e71b50b992
3 changed files with 23 additions and 8 deletions

View File

@@ -415,7 +415,6 @@ class RegenerateOrgRobot(ApiResource):
raise Unauthorized()
# TODO: Add log action event for federation config changes
@resource("/v1/organization/<orgname>/robots/<robot_shortname>/federation")
@path_param("orgname", "The name of the organization")
@path_param(
@@ -482,6 +481,8 @@ class OrgRobotFederation(ApiResource):
subject = item.get("subject")
if not issuer or not subject:
raise request_error(message="Missing one or more required fields (issuer, subject)")
if not (issuer.startswith("http://") or issuer.startswith("https://")):
raise request_error(message="Issuer must be a URL (http:// or https://)")
entry = {"issuer": issuer, "subject": subject}
if f"{issuer}:{subject}" in seen: