summaryrefslogtreecommitdiff
path: root/templates/apps/name/acls.html
blob: e1becbbc5018b22d95af79ae4a1bdec7220487c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{% extends "tree.html" %}
{% load permdisplay %}
{% block widgets %}
    $("#acl").accordion({
   		header: 'h3',
   		collapsible: true,
        active: false
   	});
{% endblock %}
{% block content %}

{% if type == "2" %}
<h2>Access Control Policy</h2>
<div class="ui-widget" style="margin-bottom: 20px;">
	<div class="ui-state-highlight ui-corner-all" style="padding: 0 .7em;"> 
		<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
		<strong>WARNING</strong> The entries below represents <strong>access control policy</strong> for {{name.short}}. Access
		control policy is the default access control used when creating new groups below this group. Changes
		will only affect <strong>newly created groups</strong> below this group. Only change this if you know
		what you are doing.</p>
		<p class="button"><a href="/name/{{name.id}}/acl/0">Switch to Normal Access Control View</a></p>
	</div>
</div>
{% else %}
<h2>Access Control</h2>
<div class="ui-widget" style="margin-bottom: 20px;">
	<div class="ui-state-default ui-corner-all" style="padding: 0 .7em;"> 
		<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> 
		The entries below represents access control for {{name.short}}. Only change this if you know
		what you are doing. If you <em>really, really, really</em> know what you are doing you may also 
		<a style="text-decoration: underline;" href="/name/{{name.id}}/acl/2">switch to access control policy view</a>
		and change the default access control for groups created below this group.</p>
	</div>
</div>

{% endif %}

<div id="acl" style="margin-bottom: 20px;">
{% for ace in acl %}
	<div id="{{ace.id}}">
	   <h3 class="listheader">Permissions for {{ace.dst|acldstdisplay}}</h3>
	   <div>
	      <div>{{ace.dst|acldstdisplay}} {{ace.data|permdisplay}}.</div>
	      <div class="rlist button">
	         <ul>
	            <li><a href="/name/{{ace.src.id}}/acl/{{ace.id}}/remove">Remove</a></li>
	         </ul>
	      </div>
	   </div>
	</div>
{% endfor %}
</div>
   <ul class="ilist">
      <li class="button"><a href="/name/{{name.id}}/acl/{{type}}/add">Add Permission</a></li>
      {% if name %}
      <li class="button right"><input type="button" onClick="document.location='{{name.url}}'" value="Cancel"/></li>
	  {% endif %}
   </ul>
{% endblock %}