Skip to content

Commit

Permalink
Base app rejection on upstream URL
Browse files Browse the repository at this point in the history
  • Loading branch information
tituspijean committed Aug 16, 2024
1 parent dc1b37b commit 235976d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
8 changes: 0 additions & 8 deletions rejectedlist.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ upstream = "https://github.com/funmusicplace/mirlo/"
website = ""
reason = "Too big of a Docker-compose mess"

[opentalk]
name = "OpenTalk"
description = "Secure video conferencing for those who value productivity, digital sovereignty, and true data prote"
upstream = "https://gitlab.opencode.de/opentalk"
website = "https://opentalk.eu/en"
reason = "Licensing mess"

[h5p]
name = "H5P"
description = "This collection of tools aim to creates interactive exercices for learning purposes."
Expand Down Expand Up @@ -174,7 +167,6 @@ upstream = "https://github.com/osclass/Osclass"
website = "https://osclass-classifieds.com"
reason = "Unmaintained"


[opentalk]
name = "OpenTalk"
description = "German developed, modern, conferencing tool running in browser alone."
Expand Down
23 changes: 12 additions & 11 deletions store/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,17 +370,18 @@ def add_to_wishlist():
rejectedlist_rawtoml = rejectedlist_rawtoml.decoded_content.decode()
rejectedlist = tomlkit.loads(rejectedlist_rawtoml)

if slug in rejectedlist:
return render_template(
"wishlist_add.html",
csrf_token=csrf_token,
successmsg=None,
errormsg=_(
"An entry with the name %(slug)s is listed among the rejected apps, with the following reason: %(reason)s",
slug=slug,
reason=rejectedlist[slug]["reason"],
),
)
for rejectedslug, rejectedinfo in rejectedlist.items():
if upstream in rejectedinfo["upstream"]:
return render_template(
"wishlist_add.html",
csrf_token=csrf_token,
successmsg=None,
errormsg=_(
"This app's repository is listed among the already rejected apps, with the following reason:<br /><q>%(reason)s</q>",
slug=rejectedslug,
reason=rejectedinfo["reason"],
),
)

app_catalog = get_catalog()["apps"]

Expand Down

0 comments on commit 235976d

Please sign in to comment.