Fix template permissions and setup configuration

- Add permission check for payment gateway edit button
- Fix project view template permission check for budget analysis link
- Update setup.py configuration
This commit is contained in:
Dries Peeters
2026-01-07 13:19:04 +01:00
parent e6ae7dd208
commit b00d75782f
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -53,9 +53,11 @@
{% endif %}
</td>
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
{% if current_user.is_admin or has_permission('manage_payment_gateways') %}
<a href="{{ url_for('payment_gateways.create_gateway') }}?edit={{ gateway.id }}" class="text-primary hover:text-primary/80 mr-4">
<i class="fas fa-edit"></i>
</a>
{% endif %}
</td>
</tr>
{% endfor %}
+2 -2
View File
@@ -22,7 +22,8 @@
<i class="fas fa-chart-line"></i>
{{ _('Dashboard') }}
</a>
{% if project.budget_amount %}
{% endif %}
{% if project.budget_amount and (current_user.is_admin or has_any_permission('edit_projects', 'archive_projects')) %}
<a href="{{ url_for('budget_alerts.project_budget_detail', project_id=project.id) }}" class="bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white px-4 py-2 rounded-lg mt-4 md:mt-0 flex items-center gap-2 transition shadow-lg">
<i class="fas fa-wallet"></i>
{{ _('Budget Analysis') }}
@@ -63,7 +64,6 @@
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
</form>
{% endif %}
{% endif %}
</div>
</div>
+1 -1
View File
@@ -7,7 +7,7 @@ from setuptools import setup, find_packages
setup(
name='timetracker',
version='4.9.11',
version='4.9.12',
packages=find_packages(),
include_package_data=True,
install_requires=[