Closed ferrada01 closed 5 years ago
Template tags
To load template tags use:
{% load permission_tags %}
filter has_role
Receives a camel case representation of a role or more than one separated by coma.
{% load permission_tags %} {% if user|has_role:'doctor,nurse' %} the user is a doctor or a nurse {% endif %}
filter can
Role permission filter.
{% load permission_tags %} {% if user|can:'create_medical_record' %} create record {% endif %}
I want to hide some html structures ( buttons and text )