diff --git a/resources/views/pages/login.twig b/resources/views/pages/login.twig
index 33de9f4c..6b46c655 100644
--- a/resources/views/pages/login.twig
+++ b/resources/views/pages/login.twig
@@ -105,7 +105,7 @@
{{ __('general.register') }}
{% if
- (has_permission_to('register') and config('registration_enabled') and config('enable_password'))
+ (can('register') and config('registration_enabled') and config('enable_password'))
or config('external_registration_url') %}
{{ __('login.registration') }}
diff --git a/resources/views/pages/news/edit.twig b/resources/views/pages/news/edit.twig
index b57bb490..9ddc4bf6 100644
--- a/resources/views/pages/news/edit.twig
+++ b/resources/views/pages/news/edit.twig
@@ -52,7 +52,7 @@
{{ f.checkbox('is_pinned', __('news.edit.is_pinned'), {
'checked': is_pinned,
}) }}
- {% if has_permission_to('news.highlight') %}
+ {% if can('news.highlight') %}
{{ f.checkbox('is_highlighted', __('news.edit.is_highlighted'), {
'checked': is_highlighted,
}) }}
diff --git a/resources/views/pages/news/news.twig b/resources/views/pages/news/news.twig
index f8cef9ae..0215b578 100644
--- a/resources/views/pages/news/news.twig
+++ b/resources/views/pages/news/news.twig
@@ -24,7 +24,7 @@
{{ m.user(comment.user, {'pronoun': true}) }}
- {% if comment.user.id == user.id or has_permission_to('admin_news') or has_permission_to('comment.delete') %}
+ {% if comment.user.id == user.id or can('admin_news') or can('comment.delete') %}
{% endif %}
- {% if has_permission_to('admin_news') %}
+ {% if can('admin_news') %}
{{ m.button(m.icon('pencil'), url('/admin/news/' ~ news.id), 'secondary', 'sm', __('form.edit')) }}
diff --git a/resources/views/pages/questions/overview.twig b/resources/views/pages/questions/overview.twig
index 1354f33f..59cf25c6 100644
--- a/resources/views/pages/questions/overview.twig
+++ b/resources/views/pages/questions/overview.twig
@@ -14,7 +14,7 @@
{% for name,opt in config('contact_options') %}
{% set url = opt is iterable ? opt[0] : opt %}
{% set permission = opt is iterable ? opt[1] : null %}
- {% if not permission or has_permission_to(permission) %}
+ {% if not permission or can(permission) %}
{% block questions %}
{% block faq_text %}
- {% if has_permission_to('faq.view') %}
+ {% if can('faq.view') %}
{% if not is_admin | default(false) %}
{{ __('question.faq_link', [url('/faq')]) | raw }}
@@ -79,16 +79,16 @@
{{ m.icon('clock') }} {{ question.created_at.format(__('general.datetime')) }}
- {% if has_permission_to('question.edit') %}
+ {% if can('question.edit') %}
{{ m.user(question.user, {'pronoun': true}) }}
{% endif %}
- {% if has_permission_to('question.edit') %}
+ {% if can('question.edit') %}
{{ m.button(m.icon('pencil'), url('/admin/questions/' ~ question.id), null, 'sm', __('form.edit')) }}
{% endif %}
- {% if question.user.id == user.id or has_permission_to('question.edit') %}
+ {% if question.user.id == user.id or can('question.edit') %}