Tighten some edit permissions on organisations
This commit is contained in:
@@ -24,17 +24,39 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu box-tool-menu">
|
||||
{% block tools %}
|
||||
{% if 'edit' not in tools.hidden %}
|
||||
<li>
|
||||
<a href="#" class="js-organisation-edit" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-edit fa-fw"></i> {{translate('EDIT')}}
|
||||
</a>
|
||||
</li>
|
||||
{% if 'delete' not in tools.hidden %}
|
||||
{% endif %}
|
||||
{% if checkAccess('leave_organisation') and (isOrganisationMember(organisation)) %}
|
||||
<li>
|
||||
<a href="#" class="js-organisation-leave" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-door-open fa-fw"></i> {{translate('ORGANISATION.LEAVE')}}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if organisation.flag_approved != 1 %}
|
||||
{% if checkAccess('approve_organisation') %}
|
||||
<li>
|
||||
<a href="#" class="js-organisation-delete" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-trash-alt fa-fw"></i> {{translate('DELETE')}}
|
||||
<a href="#" class="js-organisation-approveRegistration" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-thumbs-up fa-fw"></i> {{translate('APPROVE')}}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="js-organisation-rejectRegistration" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-thumbs-down fa-fw"></i> {{translate('REJECT')}}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% elseif 'delete' not in tools.hidden %}
|
||||
<li>
|
||||
<a href="#" class="js-organisation-delete" data-slug="{{organisation.slug}}">
|
||||
<i class="fas fa-trash-alt fa-fw"></i> {{translate('DELETE')}}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
@@ -78,7 +100,7 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
{% block organisation_profile %}{% endblock %}
|
||||
{% if checkAccess('leave_organisation') %}
|
||||
{% if checkAccess('leave_organisation') and (isOrganisationMember(organisation)) %}
|
||||
<hr>
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-danger js-organisation-leave" data-slug="{{organisation.slug}}">{{translate('ORGANISATION.LEAVE')}}</button>
|
||||
|
||||
Reference in New Issue
Block a user