Skip to content

Commit

Permalink
update permissions guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhuang committed Jul 11, 2013
1 parent c907e52 commit 6c302a1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
2 changes: 2 additions & 0 deletions deme_django/cms/templates/help_text/_getting_started.html
Expand Up @@ -10,6 +10,8 @@ <h3>General</h3>
<li>Items represent most of the content on a Deme site. While in Advanced Mode, create a new item by clicking on the Actions menu, then <i class="glyphicon glyphicon-file"></i> <b>Create</b>. Other actions are also found here.</li>
<li>Click the <i class="glyphicon glyphicon-info-sign"></i> <b>Metadata icon</b> to show and hide the Metadata pane. When viewing an item, the Metadata pane contains useful information about that particular item.
</ul>
<h3>Permissions</h3>
<p>Permissions control what users can see and do on the site. <a href="{% url 'item_type_url' viewer='item' action='permissionshelp' %}">View the Permissions Guide</a>.</p>
<h3>Customizing Your Deme Site</h3>
<ul>
<li><a href="{% url 'item_url' viewer='site' action="edit" noun=cur_site.pk %}">Edit the current site</a> to change the website title, logo, and more.</li>
Expand Down
28 changes: 24 additions & 4 deletions deme_django/cms/templates/item/permissionshelp.html
@@ -1,8 +1,28 @@
{% extends layout %}
{% load item_tags %}
{% block title %}How to use Permissions
{% endblock %}
{% block title %}How to use Permissions{% endblock %}
{% block content %}
<p>Permissions in Deme control what users can see and do. If you are authorized, you can give other users permission to perform actions or take permissions away.</p>
<h3>Permissions Example</h3>
<p>Let's say you're making a <a href="{% url 'item_type_url' viewer='textdocument' action='new' %}">new text document</a> and don't want anyone to see it.</p>
<ol>
<li>Open <i class="glyphicon glyphicon-lock"></i> <b>Permissions</b> on the item.</li>
<li>Under "Everyone", create a <i class="glyphicon glyphicon-edit"></i> <b>New Permission</b>.</li>
<li>From the new permission's dropdown menu, choose the "Do Anything" permission.</li>
<li>Click the <b>- Minus sign</b> to make it a negative permission. This means that "Everyone" <b>can not</b> "Do Anything", hence won't be able to view, edit, etc our new item.</li>
<li>Save your document. Since only you have the ability to "Do Anything" on the item, other users won't be able to see it, with the exception of the Admin.</li>
</ol>
<p>Now let's say you want to show it to just one other person, Jane.</p>
<ol>
<li>Open the item <i class="glyphicon glyphicon-lock"></i> <b>Permissions</b>.</li>
<li>Click <i class="glyphicon glyphicon-profile"></i> <b>Assign a Permission to a User</b>.</li>
<li>In the popup, find Jane and add her.</li>
<li>Go ahead and <i class="glyphicon glyphicon-th-list"></i> <b>Show All</b> permissions, and click the <b>+ Plus sign</b> next to the ones necessary to show the text document, namely "View anything" and "Comment on".</li>
<li>Save your document and now Jane will be able to view and comment on it.</li>
</ol>

<!--
<p>Permissions in Deme are very powerful and can be extremely useful. If you are authorized,
you can both give other users permission to perform actions and take away other users' permissions.</p>
Expand All @@ -26,8 +46,8 @@
Only Mike and Joe can now view the document. This is because individual permissions, which are permissions
that only apply to one person, override permissions that apply to everyone. This is why Mike can view the document,
but everyone else cannot. <br> <br>
<p>
You can also give a Collection of users permission to do something. Keep in mind that collection-wide permissions
<p>-->
<p>You can also give a Collection of users permission to do something. Keep in mind that collection-wide permissions
override permissions that apply to everyone, but individual permissions still over-ride Collection-wide permissions.
To give a collection of users special permissions, simply click "Select Collection", select the desired collection
of users, and then give the collection the desired permissions.
Expand Down
4 changes: 2 additions & 2 deletions deme_django/cms/templates/templatetags/privacy_editor.html
Expand Up @@ -302,8 +302,8 @@
</div>

<p style="display: none;" id="agent_and_collection_select_div_{{permission_editor_counter}}">
<a href="#" class="btn btn-default" onclick="$('#new_agent_dialog_{{permission_editor_counter}}').dialog('open'); return false;"><i class="glyphicon glyphicon-user"></i> <span>Assign a Permission to a User</span></a>
<a href="#" class="btn btn-default" onclick="$('#new_collection_dialog_{{permission_editor_counter}}').dialog('open'); return false;"><i class="glyphicon glyphicon-folder-open"></i> <span>Assign a Permission to a Group of Users</span></a>
<a href="#" class="btn btn-link" onclick="$('#new_agent_dialog_{{permission_editor_counter}}').dialog('open'); return false;"><i class="glyphicon glyphicon-user"></i> <span> Assign a Permission to a User</span></a>
<a href="#" class="btn btn-link" onclick="$('#new_collection_dialog_{{permission_editor_counter}}').dialog('open'); return false;"><i class="glyphicon glyphicon-folder-open"></i> <span> Assign a Permission to a Group of Users</span></a>
</p>
<p style="margin-top: 10px;">
Having trouble with permissions? Try reading the <a href="{{permissions_help_url}}">guide to using Permissions</a>
Expand Down
2 changes: 1 addition & 1 deletion deme_django/cms/views.py
Expand Up @@ -878,7 +878,7 @@ def type_admin_html(self):
return HttpResponse(template.render(self.context))

def type_permissionshelp_html(self):
self.context['action_title'] = 'Permissions help'
self.context['action_title'] = 'Permissions Guide'
self.context['metabar_contents'] = u'Documentation on setting up permissions'
template = loader.get_template('item/permissionshelp.html')
return HttpResponse(template.render(self.context))
Expand Down

0 comments on commit 6c302a1

Please sign in to comment.