+ {% if package.state == package.state.READY_FOR_REVIEW %} + {% if not package.get_download_release() %} + {{ _("Please wait for the release to be approved.") }} + {% elif package.check_perm(current_user, "APPROVE_NEW") %} + {{ _("You can now approve this package if you're ready.") }} {% else %} - {{ _("Please make sure that this package has the right to the names %(names)s", names=conflicting_modnames | join(", ")) }}. + {{ _("Please wait for the package to be approved.") }} {% endif %} -
{{ _("No specific game required") }}
- {% if package.check_perm(current_user, "EDIT_PACKAGE") %} + {% if package.state == package.state.APPROVED and package.check_perm(current_user, "EDIT_PACKAGE") %}
{{ _("Is the above correct?") }}
diff --git a/app/tests/unit/logic/__init__.py b/app/tests/unit/logic/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/app/tests/unit/test_logic_graphs.py b/app/tests/unit/logic/test_graphs.py
similarity index 100%
rename from app/tests/unit/test_logic_graphs.py
rename to app/tests/unit/logic/test_graphs.py
diff --git a/app/tests/unit/logic/test_package_approval.py b/app/tests/unit/logic/test_package_approval.py
new file mode 100644
index 00000000..dbff535b
--- /dev/null
+++ b/app/tests/unit/logic/test_package_approval.py
@@ -0,0 +1,185 @@
+# ContentDB
+# Copyright (C) rubenwardy
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see