Commit 93bba197 authored by Andreas Heimann's avatar Andreas Heimann

EMERGENCY FIX

parent 6899bbd3
......@@ -3,7 +3,7 @@ fos_user:
firewall_name: main
user_class: App\Entity\User
from_email:
address: "system@spinsha.re"
address: "noreply@spinsha.re"
sender_name: "SpinSha.re"
registration:
confirmation:
......
......@@ -22,22 +22,9 @@ security:
anonymous: true
access_control:
- { path: ^/index$, role: ROLE_USER }
- { path: ^/search, role: ROLE_USER }
- { path: ^/client$, role: ROLE_USER }
- { path: ^/legal$, role: ROLE_USER }
- { path: ^/song$, role: ROLE_USER }
- { path: ^/user$, role: ROLE_USER }
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/upload$, role: ROLE_USER }
- { path: ^/settings$, role: ROLE_USER }
- { path: ^/moderation/, role: ROLE_MODERATOR }
# ---- ACCESS CONTROL FOR LAUNCH ----
# - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
# - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
# - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
# - { path: ^/upload$, role: ROLE_USER }
# - { path: ^/settings$, role: ROLE_USER }
# - { path: ^/moderation$, role: ROLE_MODERATOR }
\ No newline at end of file
- { path: ^/moderation$, role: ROLE_MODERATOR }
\ No newline at end of file
......@@ -32,20 +32,22 @@
<a href="spinshare-user://{{ user.id }}" class="button">Open in Client</a>
<a href="{{ path('report.user', {userId: user.id}) }}" class="button">Report</a>
</div>
{% if is_granted('ROLE_MODERATOR') and user.id != app.user.id %}
<div class="user-detail-actions-moderation">
{% if user.enabled %}
<a href="{{ path('moderation.user.ban', {userId: user.id}) }}" class="button">Ban User</a>
{% else %}
<a href="{{ path('moderation.user.unban', {userId: user.id}) }}" class="button">Unban User</a>
{% endif %}
<a href="{{ path('moderation.user.resetAvatar', {userId: user.id}) }}" class="button">Reset Avatar</a>
<a href="{{ path('moderation.user.toggleVerified', {userId: user.id}) }}" class="button">{{ user.isVerified ? "Unverify" : "Verify" }}</a>
{% if is_granted('ROLE_ADMIN') %}
<a href="{{ path('moderation.user.toggleMod', {userId: user.id}) }}" class="button">{{ ("ROLE_MODERATOR" in user.roles) ? "Demote to User" : "Promote to Mod" }}</a>
<a href="{{ path('moderation.user.togglePatreon', {userId: user.id}) }}" class="button">{{ user.isPatreon ? "Remove Patreon" : "Make Patreon" }}</a>
{% endif %}
</div>
{% if is_granted("ROLE_USER") %}
{% if is_granted('ROLE_MODERATOR') and user.id != app.user.id %}
<div class="user-detail-actions-moderation">
{% if user.enabled %}
<a href="{{ path('moderation.user.ban', {userId: user.id}) }}" class="button">Ban User</a>
{% else %}
<a href="{{ path('moderation.user.unban', {userId: user.id}) }}" class="button">Unban User</a>
{% endif %}
<a href="{{ path('moderation.user.resetAvatar', {userId: user.id}) }}" class="button">Reset Avatar</a>
<a href="{{ path('moderation.user.toggleVerified', {userId: user.id}) }}" class="button">{{ user.isVerified ? "Unverify" : "Verify" }}</a>
{% if is_granted('ROLE_ADMIN') %}
<a href="{{ path('moderation.user.toggleMod', {userId: user.id}) }}" class="button">{{ ("ROLE_MODERATOR" in user.roles) ? "Demote to User" : "Promote to Mod" }}</a>
<a href="{{ path('moderation.user.togglePatreon', {userId: user.id}) }}" class="button">{{ user.isPatreon ? "Remove Patreon" : "Make Patreon" }}</a>
{% endif %}
</div>
{% endif %}
{% endif %}
<div class="song-row song-row-user">
<div class="song-header">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment