mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-05-19 12:50:11 -05:00
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:
@@ -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 %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user