Permalink
Browse files

Cherry pick 'Some UniSubs -> Amara stragglers.' (44633bf) to staging

  • Loading branch information...
1 parent e4ff144 commit 9e6ab309655f7981bc3e1d9d42faaf777404f912 @nicksergeant nicksergeant committed Apr 17, 2012
@@ -1,9 +1,8 @@
-1
-00:00:00,004 --> 00:00:03,018
+1Amara00:00:03,018
We started Universal Subtitles because we believe
2
-00:00:03,018 --> 00:00:06,075
+00:00:03,01Amara
every video on the web should be subtitle-able.
3
@@ -38,8 +37,7 @@ After that, tap on your keyboard to sync them with the video.
00:00:44,071 --> 00:00:47,052
Then you're done— we give you an embed code for the video
-11
-00:00:47,052 --> 00:00:49,089
+Amara> 00:00:49,089
that you can put on any website
12
View
@@ -1,6 +1,6 @@
=======================
The permission system
-=======================
+
Permissions are a combination of roles and narrowings.
- A team onwer can do anything.
- A team admin can do anything, but assign new admins. An admin can have
@@ -39,3 +39,82 @@ and how rules interact. This is on a stand alone module to avoid issues
with circular dependencies on imports.
.. automodule:: unisubs.apps.teams.permissions_const
+=======
+=====================
+
+The permission system in Amara is very flexible to allow for the
+needs of different teams. This document will give you a high level overview of
+what is possible. You should read this before trying to understand the source
+code.
+
+Overview
+--------
+
+Let's start with some language. In the simplest case, when a user is part of a
+team, they can have one of the following roles:
+
+* Contributor
+ * Transcribe
+ * Translate
+ * Assign tasks to themselves
+* Manager
+ * Review subtitles
+ * Approve subtitles
+ * Assign tasks to other people
+ * Everything that a contributor can do
+* Admin
+ * Assign new managers
+ * Delete subtitles
+ * Everything that a manager can do
+* Owner
+ * Everything
+
+.. note:: This is just an example to give you an idea of how this could work.
+
+A user's role is stored in the ``teams.models.TeamMember`` model which stores a
+reference to the user and team objects.
+
+Checking for required permissions
+---------------------------------
+
+When you want to check if a certain user has the required privileges to perform
+a task, you should use one of the functions in ``teams.permissions``. For
+example, if you'd like to check if a user can approve a video, you could do
+something like this:
+
+.. code-block:: python
+
+ from teams.permissions import can_approve
+
+ if can_approve(video, user):
+ # Do something that requires the approval permission
+
+.. note:: There is no middleware to attach the current user's privileges to the
+ request instance. Instead, you have explicitly call the necessary
+ function whenever you want to verify the user's privileges.
+
+Workflows
+---------
+
+A team can choose their own workflow to efficiently manage their videos,
+translations and volunteers. When you are setting up a workflow for your team,
+you can decide how certain actions will be performed. For example:
+
+* Who can join the team?
+* Who can and remove videos from the team?
+* Who can assign tasks?
+* How many tasks a user can have at a time?
+* How many days should a user get to complete a task?
+* Who can transcribe subtitles?
+* Who can translate subtitles?
+* Is there a review process?
+* Is there an approval process?
+
+So, why should you care? For example, you don't trust your contributors with
+transcription of new videos since it's somewhat difficult. Therefore, you can
+choose to only allow managers and above to transcribe videos and contributors
+to only translate videos to different languages. Or, the quality of the
+subtitles is crucial to you and you want to make sure that nothing less than
+that ever gets out. So, you would turn on both the review and approval
+process. This way three sets of eyes will look at the subtitles before it goes
+public.
@@ -29,8 +29,8 @@ goog.provide('unisubs.subtitle.MSServerModel');
* @constructor
* @implements {unisubs.subtitle.ServerModel}
* @extends {goog.Disposable}
- * @param {string} sessionPK Universal Subtitles subtitling session primary key
- * @param {string} videoID Universal Subtitles video id
+ * @param {string} sessionPK Amara subtitling session primary key
+ * @param {string} videoID Amara video id
* @param {string} videoURL url for the video
* @param {unisubs.subtitle.EditableCaptionSet} editableCaptionSet
*/
View
@@ -233,9 +233,9 @@ <h3>7. Digital Millennium Copyright Act</h3>
<h3>8. Warranty Disclaimer</h3>
<p>YOU AGREE THAT YOUR USE OF THE SERVICES SHALL BE AT YOUR SOLE RISK. TO THE
-FULLEST EXTENT PERMITTED BY LAW, UNIVERSAL SUBTITLES, ITS OFFICERS, DIRECTORS,
+FULLEST EXTENT PERMITTED BY LAW, Amara, ITS OFFICERS, DIRECTORS,
EMPLOYEES, AND AGENTS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, IN
-CONNECTION WITH THE SERVICES AND YOUR USE THEREOF. UNIVERSAL SUBTITLES MAKES NO
+CONNECTION WITH THE SERVICES AND YOUR USE THEREOF. Amara MAKES NO
WARRANTIES OR REPRESENTATIONS ABOUT THE ACCURACY OR COMPLETENESS OF THIS SITE'S
CONTENT OR THE CONTENT OF ANY SITES LINKED TO THIS SITE AND ASSUMES NO
LIABILITY OR RESPONSIBILITY FOR ANY (I) ERRORS, MISTAKES, OR INACCURACIES OF
@@ -251,15 +251,15 @@ <h3>8. Warranty Disclaimer</h3>
SUBTITLES DOES NOT WARRANT, ENDORSE, GUARANTEE, OR ASSUME RESPONSIBILITY FOR
ANY PRODUCT OR SERVICE ADVERTISED OR OFFERED BY A THIRD PARTY THROUGH THE
SERVICES OR ANY HYPERLINKED SERVICES OR FEATURED IN ANY BANNER OR OTHER
-ADVERTISING, AND UNIVERSAL SUBTITLES WILL NOT BE A PARTY TO OR IN ANY WAY BE
+ADVERTISING, AND Amara WILL NOT BE A PARTY TO OR IN ANY WAY BE
RESPONSIBLE FOR MONITORING ANY TRANSACTION BETWEEN YOU AND THIRD-PARTY
PROVIDERS OF PRODUCTS OR SERVICES. AS WITH THE PURCHASE OF A PRODUCT OR SERVICE
THROUGH ANY MEDIUM OR IN ANY ENVIRONMENT, YOU SHOULD USE YOUR BEST JUDGMENT AND
EXERCISE CAUTION WHERE APPROPRIATE.</p>
<h3>9. Limitation of Liability</h3>
-<p>IN NO EVENT SHALL UNIVERSAL SUBTITLES, ITS OFFICERS, DIRECTORS, EMPLOYEES,
+<p>IN NO EVENT SHALL Amara, ITS OFFICERS, DIRECTORS, EMPLOYEES,
OR AGENTS, BE LIABLE TO YOU FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
PUNITIVE, OR CONSEQUENTIAL DAMAGES WHATSOEVER RESULTING FROM ANY (I) ERRORS,
MISTAKES, OR INACCURACIES OF CONTENT, (II) PERSONAL INJURY OR PROPERTY DAMAGE,
@@ -276,7 +276,7 @@ <h3>9. Limitation of Liability</h3>
POSSIBILITY OF SUCH DAMAGES. THE FOREGOING LIMITATION OF LIABILITY SHALL APPLY
TO THE FULLEST EXTENT PERMITTED BY LAW IN THE APPLICABLE JURISDICTION.</p>
-<p>YOU SPECIFICALLY ACKNOWLEDGE THAT UNIVERSAL SUBTITLES SHALL NOT BE LIABLE
+<p>YOU SPECIFICALLY ACKNOWLEDGE THAT Amara SHALL NOT BE LIABLE
FOR CONTENT OR THE DEFAMATORY, OFFENSIVE, OR ILLEGAL CONDUCT OF ANY THIRD PARTY
AND THAT THE RISK OF HARM OR DAMAGE FROM THE FOREGOING RESTS ENTIRELY WITH
YOU.</p>
@@ -340,7 +340,7 @@ <h3>13. General</h3>
without notice, and it is your responsibility to review these Terms of Service
for any changes. Your use of the Service following any amendment of these Terms
of Service will signify your assent to and acceptance of its revised terms. YOU
-AND UNIVERSAL SUBTITLES AGREE THAT ANY CAUSE OF ACTION ARISING OUT OF OR
+AND Amara AGREE THAT ANY CAUSE OF ACTION ARISING OUT OF OR
RELATED TO THE SERVICES MUST COMMENCE WITHIN ONE (1) YEAR AFTER THE CAUSE OF
ACTION ACCRUES. OTHERWISE, SUCH CAUSE OF ACTION IS PERMANENTLY BARRED.</p>
@@ -5,7 +5,7 @@
<script type="text/javascript" language="javascript">
<!--
function draw_unisub_counter(data){
- document.write('<table cellpadding="0" cellspacing="0" border="0" style="padding:0;"><tr><td valing="top"><div style="margin: 0px; padding: 0px; font:10px Tahoma; width: 90px; background: #8f8;"><div><a href="http://{{ domain }}/">Universal subtitles</a></div><div>Videos count: '+data.videos_count+'</div></div></td></tr></table>');
+ document.write('<table cellpadding="0" cellspacing="0" border="0" style="padding:0;"><tr><td valing="top"><div style="margin: 0px; padding: 0px; font:10px Tahoma; width: 90px; background: #8f8;"><div><a href="http://{{ domain }}/">Amara</a></div><div>Videos count: '+data.videos_count+'</div></div></td></tr></table>');
}
(function(){
var D = document;
View
@@ -10,3 +10,15 @@ def send_templated_email_async(to, subject, body_template, body_dict,
return send_templated_email(
to,subject, body_template, body_dict, from_email=None, ct="html",
fail_silently=False, check_user_preference=check_user_preference)
+
+
+@periodic_task(run_every=crontab(minute=0, hour=1))
+def send_error_report(date=None):
+ date = date or datetime.datetime.now() - datetime.timedelta(days=1)
+ recipients = getattr(settings,'SEND_ERROR_REPORT_TO', None)
+ if not recipients:
+ return
+ data = errorreport._error_report_data(date)
+ message = render_to_string("internal/error-report.txt", data)
+ subject = date.strftime("Errors for Amara for %Y/%M/%d")
+ send_mail(subject, message, "unisubs error bot", recipients)

0 comments on commit 9e6ab30

Please sign in to comment.