Page MenuHomec4science

webaccess_admin_showroledetails.html
No OneTemporary

File Metadata

Created
Fri, Nov 29, 19:41

webaccess_admin_showroledetails.html

{#
## This file is part of Invenio.
## Copyright (C) 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#}
{% extends "page.html" %}
{% set title = role.name %}
{% block body %}
<script type="text/javascript">
$(document).ready(function() {
$('#toggleids').change(function() {
var toggle = $('#toggleids').attr("checked")
$(".ids").attr("checked", function(i, val) {
return ! $(this).attr("checked");
});
});
$('[rel=tooltip]').tooltip({placement:'bottom'});
});
</script>
<ul class="nav nav-pills">
<li>
<a rel="tooltip" title="{{ _('go here to add a new role.') }}" href="{{ url_for('.addrole') }}">
<i class="icon-pencil"></i> {{ _("Create new role") }}
</a>
</li>
<li>
<a rel="tooltip" title="{{ _('connect a user to role %s.') % role.name }}" href="{{ url_for('.adduserrole', id_role=role.id) }}">
<i class="icon-user"></i> {{ _("Connect user") }}
</a>
</li>
{# <li><button class="btn" data-toggle="collapse" data-target="#filter" href="#filter">{{ _("Toggle Filter") }}</button></li>#}
</ul>
<div class="row">
<div class="span4">
<h3>{{ _('Role details') }}</h3>
<dl>
<dt>{{ _('Id') }}</dt>
<dd>{{ role.id }}</dd>
<dt>{{ _('Name') }}</dt>
<dd>{{ role.name }}</dd>
<dt>{{ _('Description') }}</dt>
<dd>{{ role.description }}</dd>
<dt>{{ _('Firewall like role definition') }}</dt>
<dd><pre>{{ role.firerole_def_src }}</pre></dd>
</dl>
</div>
<div class="span4">
<h3>{{ _('Users') }}</h3>
{%- if role.users -%}
<table class="table">
{%- for u in role.users -%}
<tr>
<td>
<a href="{{ url_for('.showuserdetails', id_user=u.user.id) }}">
{{ u.user.email }}
</a>
</td><td>
<a rel="tooltip" title="{{ _('disconnect from role') }}" class="pull-right" href="{{ url_for('.deleteuserrole', id_role=role.id, id_user=u.user.id) }}">
<i class="icon-remove-sign"></i>
</a>
</td>
</tr>
{%- endfor -%}
</table>
{%- endif -%}
</div>
<div class="span4">
<h3>{{ _('Actions') }}</h3>
{%- if role.authorizations -%}
<div class="accordion">
{%- for action, authorizations in role.authorizations|groupby('action') -%}
<div class="accordion-group">
<div class="accordion-heading">
<div class="accordion-toggle" data-toggle="collapse" data-target="#auths{{ action.id }}">
<a href="{{ url_for('.showactiondetails', id_action=action.id) }}">
{{ action.name }}
</a>
<a rel="tooltip" title="{{ _('disconnect action with all arguments from role') }}" class="pull-right" href="{{ url_for('.deleteauthorization', id_role=role.id, id_action=action.id) }}">
<i class="icon-remove-sign"></i>
</a>
</div>
</div>
{%- if authorizations and authorizations[0].argument -%}
<div id="auths{{ action.id }}" class="collapse in accordion-body">
<table class="table">
{%- for i, auths in authorizations|groupby('argumentlistid') -%}
{%- if loop.first -%}
<tr><th>#</th><th>
{{ auths|join('</th><th>', attribute='argument.keyword')|safe }}
</th><th></th></tr>
{%- endif -%}
<tr><td>{{ i }}</td><td>
{{ auths|join('</td><td>', attribute='argument.value')|safe }}
</td>
<td>
<a rel="tooltip" title="{{ _('disconnect argument list from role') }}" class="pull-right" href="{{ url_for('.deleteauthorization', id_role=role.id, id_action=action.id, argumentlistid=i) }}">
<i class="icon-remove-sign"></i>
</a>
</td>
</tr>
{%- endfor -%}
</table>
</div>
{%- endif -%}
</div>
{%- endfor -%}
</div>
{%- endif -%}
</div>
</div>
{% endblock body %}

Event Timeline