diff --git a/resources/views/yuuno/forum/topic.twig b/resources/views/yuuno/forum/topic.twig
index 6987963..e51a801 100644
--- a/resources/views/yuuno/forum/topic.twig
+++ b/resources/views/yuuno/forum/topic.twig
@@ -5,35 +5,31 @@
{% set title %}{% if topic is defined %}{{ topic.title }}{% else %}Creating topic in {{ forum.name }}{% endif %}{% endset %}
{% if topic is defined %}
- {% if forum.permission(constant('Sakura\\Perms\\Forum::REPLY'), user.id)
+ {% if forum.perms.reply
and (
topic.status != 1
- or forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id)
+ or forum.perms.changeStatus
) %}
{% set forumReplyLink %}#reply{% endset %}
{% endif %}
- {% if forum.permission(constant('Sakura\\Perms\\Forum::STICKY'), user.id)
- or forum.permission(constant('Sakura\\Perms\\Forum::ANNOUNCEMENT'), user.id)
- or forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id)
- or forum.permission(constant('Sakura\\Perms\\Forum::MOVE'), user.id)
- or forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %}
+ {% if forum.perms.changeType
+ or forum.perms.changeStatus
+ or forum.perms.topicMove
+ or forum.perms.deleteAny %}
{% set showMod = true %}
{% endif %}
- {% if forum.permission(constant('Sakura\\Perms\\Forum::STICKY'), user.id) %}
+ {% if forum.perms.changeType %}
{% set forumSticky = topic.type == 1 ? true : false %}
- {% endif %}
-
- {% if forum.permission(constant('Sakura\\Perms\\Forum::ANNOUNCEMENT'), user.id) %}
{% set forumAnnounce = topic.type == 2 ? true : false %}
{% endif %}
- {% if forum.permission(constant('Sakura\\Perms\\Forum::LOCK'), user.id) %}
+ {% if forum.perms.changeStatus %}
{% set forumLock = topic.status == 1 ? true : false %}
{% endif %}
- {% if forum.permission(constant('Sakura\\Perms\\Forum::MOVE'), user.id) %}
+ {% if forum.perms.topicMove %}
{% if topic.oldForum %}
{% set forumRestore = true %}
{% endif %}
@@ -43,7 +39,7 @@
{% endif %}
{% endif %}
- {% if forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %}
+ {% if forum.perms.deleteAny %}
{% if topic.forum == config('forum.trash') %}
{% set forumPrune = true %}
{% endif %}
@@ -116,10 +112,10 @@
{% if post.poster.id == (topic.posts|first).poster.id %}
{% endif %}
{% if user.isActive %}
- {% if (user.id == post.poster.id and forum.permission(constant('Sakura\\Perms\\Forum::EDIT_OWN'), user.id)) or forum.permission(constant('Sakura\\Perms\\Forum::EDIT_ANY'), user.id) %}
+ {% if (user.id == post.poster.id and forum.perms.edit) or forum.perms.editAny %}
{% endif %}
- {% if (user.id == post.poster.id and forum.permission(constant('Sakura\\Perms\\Forum::DELETE_OWN'), user.id)) or forum.permission(constant('Sakura\\Perms\\Forum::DELETE_ANY'), user.id) %}
+ {% if (user.id == post.poster.id and forum.perms.delete) or forum.perms.deleteAny %}
{% endif %}
{% if not (post.poster.activated or post.poster.restricted or user.id == post.poster.id) %}