@RegisterMigration(16, MIGRATIONS)
def update_user_privilege_columns(db):
- metadata = MetaData(bind=db.bind)
+ # first, create the privileges which would be created by foundations
default_privileges = Privilege.query.filter(
Privilege.privilege_name !=u'admin').filter(
Privilege.privilege_name !=u'moderator').filter(
Privilege.privilege_name ==u'admin').first()
active_privilege = Privilege.query.filter(
Privilege.privilege_name ==u'active').first()
+ # then, assign them to the appropriate users
for inactive_user in User.query.filter(
User.status!=u'active').filter(
User.is_admin==False).all():
admin_user.all_privileges = default_privileges + [
admin_privilege, active_privilege]
admin_user.save()
+
+ # and then drop the now vestigial status column
+ metadata = MetaData(bind=db.bind)
+ user_table = inspect_table(metadata, 'core__users')
+ status = user_table.columns['status']
+ status.drop()
+ db.commit()
+
# point.
email = Column(Unicode, nullable=False)
pw_hash = Column(Unicode)
+#--column email_verified is VESTIGIAL with privileges and should not be used---
+#--should be dropped ASAP though a bug in sqlite3 prevents this atm------------
email_verified = Column(Boolean, default=False)
created = Column(DateTime, nullable=False, default=datetime.datetime.now)
- status = Column(Unicode, default=u"needs_email_verification", nullable=False)
# Intented to be nullable=False, but migrations would not work for it
# set to nullable=True implicitly.
wants_comment_notification = Column(Boolean, default=True)
license_preference = Column(Unicode)
+#--column admin is VESTIGIAL with privileges and should not be used------------
+#--should be dropped ASAP though a bug in sqlite3 prevents this atm------------
is_admin = Column(Boolean, default=False, nullable=False)
url = Column(Unicode)
bio = Column(UnicodeText) # ??
+++ /dev/null
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-meta_routes = [
- ('mediagoblin.meta.terms_of_service',
- '/tos/',
- 'mediagoblin.meta.views:terms_of_service'),
- ('mediagoblin.meta.reports_panel',
- '/reports/',
- 'mediagoblin.meta.views:public_reports_panel'),
- ('mediagoblin.meta.reports_detail',
- '/reports/<int:report_id>',
- 'mediagoblin.meta.views:public_reports_details')
-]
+++ /dev/null
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from mediagoblin.tools.response import render_to_response
-
-
-def terms_of_service(request):
- return render_to_response(request,
- 'mediagoblin/meta/terms_of_service.html',
- {})
-
-def public_reports_panel(request):
- return render_to_response(request,
- 'mediagoblin/meta/reports_panel.html',
- {})
-
-def public_reports_details(request):
- return render_to_response(request,
- 'mediagoblin/meta/reports_details.html',
- {})
This form is used for sorting and filtering through different reports in
the mediagoblin.moderation.reports_panel view.
- Parameters that start with 'active_' refer to a sort/filter for the active
- reports.
- Parameters that start with 'closed_' refer to a sort/filter for the closed
- reports.
"""
active_p = wtforms.IntegerField(
- _(u'Page'),
- validators=[wtforms.validators.optional()])
- active_reported_user = wtforms.IntegerField(
- _(u'Reported User'),
- validators=[wtforms.validators.optional()])
- active_reporter = wtforms.IntegerField(
- _(u'Reporter'),
validators=[wtforms.validators.optional()])
closed_p = wtforms.IntegerField(
- _(u'Page'),
validators=[wtforms.validators.optional()])
- closed_reported_user = wtforms.IntegerField(
- _(u'Reported User'),
+ reported_user = wtforms.IntegerField(
validators=[wtforms.validators.optional()])
- closed_reporter = wtforms.IntegerField(
- _(u'Reporter'),
+ reporter = wtforms.IntegerField(
validators=[wtforms.validators.optional()])
-
user_ban.first().delete()
return True
+def parse_report_panel_settings(form):
+ """
+ This function parses the url arguments to which are used to filter reports
+ in the reports panel view. More filters can be added to make a usuable
+ search function.
+
+ :returns A dictionary of sqlalchemy-usable filters.
+ """
+ filters = {}
+
+ if form.validate():
+ filters['reported_user_id'] = form.reported_user.data
+ filters['reporter_id'] = form.reporter.data
+ filters = dict((k, v)
+ for k, v in filters.iteritems() if v)
+ return filters
from mediagoblin.tools.response import render_to_response, redirect
from mediagoblin.moderation import forms as moderation_forms
from mediagoblin.moderation.tools import (take_punitive_actions, \
- take_away_privileges, give_privileges, ban_user, unban_user)
+ take_away_privileges, give_privileges, ban_user, unban_user, \
+ parse_report_panel_settings)
+from werkzeug.datastructures import ImmutableMultiDict
from datetime import datetime
from math import ceil
Show the global panel for monitoring reports filed against comments or
media entries for this instance.
'''
-
- form = moderation_forms.ReportPanelSortingForm(request.args)
- active_settings = {'start_page':1, 'filters':{}}
- closed_settings = {'start_page':1, 'filters':{}}
- if form.validate():
- active_settings['start_page'] = form.active_p.data or 1
- active_settings['filters']['reported_user_id'] = form.active_reported_user.data
- active_settings['filters']['reporter_id'] = form.active_reporter.data
- closed_settings['start_page'] = form.closed_p.data or 1
- closed_settings['filters']['reported_user_id'] = form.closed_reported_user.data
- closed_settings['filters']['reporter_id'] = form.closed_reporter.data
-
- active_settings['filters']=dict((k, v) for k, v in active_settings['filters'].iteritems() if v)
- closed_settings['filters']=dict((k, v) for k, v in closed_settings['filters'].iteritems() if v)
- active_filter = [
- getattr(ReportBase,key)==val \
-for key,val in active_settings['filters'].viewitems()]
- closed_filter = [
- getattr(ReportBase,key)==val \
-for key,val in active_settings['filters'].viewitems()]
+ filters = []
+ active_settings, closed_settings = {'current_page':1}, {'current_page':1}
+
+ if len(request.args) > 0:
+ form = moderation_forms.ReportPanelSortingForm(request.args)
+ if form.validate():
+ filters = parse_report_panel_settings(form)
+ active_settings['current_page'] = form.active_p.data or 1
+ closed_settings['current_page'] = form.closed_p.data or 1
+ filters = [
+ getattr(ReportBase,key)==val
+ for key,val in filters.viewitems()]
all_active = ReportBase.query.filter(
ReportBase.discriminator!="archived_report").filter(
- *active_filter)
+ *filters)
all_closed = ReportBase.query.filter(
ReportBase.discriminator=="archived_report").filter(
- *closed_filter)
+ *filters)
+
+ # report_list and closed_report_list are the two lists of up to 10
+ # items which are actually passed to the user in this request
report_list = all_active.order_by(
- ReportBase.created.desc()).offset((active_settings['start_page']-1)*10).limit(10)
+ ReportBase.created.desc()).offset(
+ (active_settings['current_page']-1)*10).limit(10)
closed_report_list = all_closed.order_by(
- ReportBase.created.desc()).offset((closed_settings['start_page']-1)*10).limit(10)
+ ReportBase.created.desc()).offset(
+ (closed_settings['current_page']-1)*10).limit(10)
+
active_settings['last_page'] = int(ceil(all_active.count()/10.))
closed_settings['last_page'] = int(ceil(all_closed.count()/10.))
# Render to response
from mediagoblin.tools.pluginapi import PluginManager
from mediagoblin.moderation.routing import moderation_routes
from mediagoblin.auth.routing import auth_routes
-from mediagoblin.meta.routing import meta_routes
_log = logging.getLogger(__name__)
def get_url_map():
add_route('index', '/', 'mediagoblin.views:root_view')
+ add_route('terms_of_service','/terms_of_service',
+ 'mediagoblin.views:terms_of_service')
mount('/auth', auth_routes)
mount('/mod', moderation_routes)
- mount('/meta', meta_routes)
import mediagoblin.submit.routing
import mediagoblin.user_pages.routing
margin: 6px 8px 6px 0;
}
+.fine_print {
+ font-size: 0.8em;
+}
+
.mediagoblin_content {
width: 100%;
padding-bottom: 74px;
#code_of_conduct_list li {
margin:5px 0 15px 25px;
}
+#code_of_conduct_list strong{
+ color:#fff;
+}
+
.nested_sublist {
margin: 5px 0 10px 25px;
font-size:80%;
"javascript:;"
{% endif %}
>{% trans %}log out{% endtrans %}</a>
+ <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}">
+ {%- trans %}Create new collection{% endtrans -%}
+ </a>
+ <p class="fine_print">
+ <a href="{{ request.urlgen('terms_of_service') }}">Terms of Service</a>
+ </p>
{% endif %}
{%- elif auth %}
<a href=
<a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}">
{%- trans %}Add media{% endtrans -%}
</a>
- <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}">
- {%- trans %}Create new collection{% endtrans -%}
- </a>
{% if request.user.has_privilege('admin','moderator') %}
<p>
<span class="dropdown_title">Moderation powers:</span>
<a href="{{ request.urlgen('mediagoblin.moderation.media_panel') }}">
{%- trans %}Media processing panel{% endtrans -%}
</a>
+ ·
<a href="{{ request.urlgen('mediagoblin.moderation.users') }}">
{%- trans %}User management panel{% endtrans -%}
</a>
+ ·
<a href="{{ request.urlgen('mediagoblin.moderation.reports') }}">
{%- trans %}Report management panel{% endtrans -%}
</a>
</p>
{% endif %}
+ <a class="button_action" href="{{ request.urlgen('mediagoblin.submit.collection') }}">
+ {%- trans %}Create new collection{% endtrans -%}
+ </a>
+ <p class="fine_print">
+ <a href="{{ request.urlgen('terms_of_service') }}">Terms of Service</a>
+ </p>
{% include 'mediagoblin/fragments/header_notifications.html' %}
</div>
{% endif %}
+++ /dev/null
-{#
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#}
-{% extends "mediagoblin/base.html" %}
-
-{% block title %}
- Code of Conduct
-{% endblock %}
-
-{% block mediagoblin_content -%}
-<h2>{% trans %}Code of Conduct for this Website{% endtrans %}</h2>
-
-{# Suggested layout for this page:
-<ol id="code_of_conduct_list">
- <li> Item #1 </li>
- <li>
- Item #2
- <ol class="nested_sublist">
- <li>Sub-Item #1</li>
- <li>Sub-Item #2</li>
- <li>
- Sub-Item #3
- <ol class="nested_sublist">
- <li>Sub-Subitem #1</li>
- </ol>
- </li>
- </ol>
- </li>
- <li>Item #3 </li>
-</ol>
-#}
-{% endblock -%}
+++ /dev/null
-{#
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#}
+++ /dev/null
-{#
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program 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 Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#}
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
{% extends "mediagoblin/base.html" %}
+{% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
{% block title -%}
{% trans %}Report panel{% endtrans %} — {{ super() }}
<h2>{% trans %}Active Reports Filed{% endtrans %}</h2>
{% if not active_settings.last_page == 1 %}
- {% if 'active_p='~active_settings.start_page in request.query_string %}
+ {% if 'active_p='~active_settings.current_page in request.query_string %}
{% set query_string = request.query_string %}{% else %}
{% set query_string =
-'active_p='~active_settings.start_page~"&"+request.query_string %}
+'active_p='~active_settings.current_page~"&"+request.query_string %}
{% endif %}
<div class="right_align">
- {% set first_vis = active_settings.start_page-3 %}
- {% set last_vis = active_settings.start_page+3 %}
- {% set curr_page = active_settings.start_page %}
+ {% set first_vis = active_settings.current_page-3 %}
+ {% set last_vis = active_settings.current_page+3 %}
+ {% set curr_page = active_settings.current_page %}
{% if 1 == curr_page %}<b>1</b>{% else %}
<a href ="?{{ query_string.replace(
- 'active_p='~active_settings.start_page,
+ 'active_p='~active_settings.current_page,
'active_p='~1) }}">
- {{ 1 }}</a>{% endif %}
+ 1</a>{% endif %}
{% if first_vis > 1 %}...{% endif %}
{% for p in range(first_vis,last_vis+1) %}
- {% if p > 1 and p < active_settings.last_page %}
+ {% if p > 1 and p < active_settings.last_page and
+curr_page !=p %}
<a href="?{{ query_string.replace(
- 'active_p='~active_settings.start_page,
+ 'active_p='~active_settings.current_page,
'active_p='~p) }}">
{{ p }}</a>
+ {% elif p > 1 and p < active_settings.last_page %}
+ <b>{{ p }}</b>
{% endif %}
{% endfor %}
{% if last_vis < active_settings.last_page %}...{% endif %}
+ {% if active_settings.last_page != curr_page %}
<a href ="?{{ query_string.replace(
- 'active_p='~active_settings.start_page,
+ 'active_p='~active_settings.current_page,
'active_p='~active_settings.last_page) }}">
{{ active_settings.last_page }}</a>
+ {% else %}<b>{{ active_settings.last_page }}</b>
+ {% endif %}
</div>
{% endif %}
{% if report_list.count() %}
{% endif %}
<h2>{% trans %}Closed Reports{% endtrans %}</h2>
{% if not closed_settings.last_page == 1 %}
- {% if 'closed_p='~closed_settings.start_page in request.query_string %}
+ {% if 'closed_p='~closed_settings.current_page in request.query_string %}
{% set query_string = request.query_string %}{% else %}
{% set query_string =
-'closed_p='~closed_settings.start_page~"&"+request.query_string %}
+'closed_p='~closed_settings.current_page~"&"+request.query_string %}
{% endif %}
<div class="right_align">
- {% set first_vis = closed_settings.start_page-3 %}
- {% set last_vis = closed_settings.start_page+3 %}
+ {% set first_vis = closed_settings.current_page-3 %}
+ {% set last_vis = closed_settings.current_page+3 %}
+ {% set curr_page = closed_settings.current_page %}
+ {% if not curr_page==1 %}
<a href ="?{{ query_string.replace(
- 'closed_p='~closed_settings.start_page,
- 'closed_p='~1) }}">
- {{ 1 }}</a>
+ 'closed_p='~closed_settings.current_page,
+ 'closed_p='~1) }}">1</a>
+ {% else %}
+ <b>1 </b>
+ {% endif %}
{% if first_vis > 1 %}...{% endif %}
{% for p in range(first_vis,last_vis+1) %}
- {% if p > 1 and p < closed_settings.last_page %}
+ {% if p > 1 and p < closed_settings.last_page and
+curr_page !=p %}
<a href="?{{ query_string.replace(
- 'closed_p='~closed_settings.start_page,
+ 'closed_p='~closed_settings.current_page,
'closed_p='~p) }}">
{{ p }}</a>
+
+ {% elif p > 1 and p < closed_settings.last_page %}
+ <b>{{ p }}</b>
{% endif %}
{% endfor %}
{% if last_vis < closed_settings.last_page %}...{% endif %}
- <a href ="?{{ query_string.replace(
- 'closed_p='~closed_settings.start_page,
+ {% if curr_page != closed_settings.last_page %}
+ <a href ="?{{ query_string.replace(
+ 'closed_p='~closed_settings.current_page,
'closed_p='~closed_settings.last_page) }}">
- {{ closed_settings.last_page }}</a>
+ {{ closed_settings.last_page }}</a>
+ {% else %}<b>{{ closed_settings.last_page }}</b>
+ {% endif %}
</div>
{% endif %}
{% if closed_report_list.count() %}
{% else %}
<p><em>{% trans %}No closed reports found.{% endtrans %}</em></p>
{% endif %}
+
{% endblock %}
<p>{% trans %}Sorry, no such user found.{% endtrans %}</p>
{# User exists, but needs verification #}
{% elif not user.has_privilege('active') %}
- <div class="form_box">
+ <div class="profile_sidebar empty_space">
<h1>{% trans %}Email verification needed{% endtrans %}</h1>
<p>
{% trans -%}
{%- endtrans %}
</p>
- <p>
- {% trans login_url=request.urlgen('mediagoblin.auth.login') -%}
- If you are that person but you've lost your verification email, you can
- <a href="{{ login_url }}">log in</a> and resend it.
- {%- endtrans %}
- </p>
</div>
{# Active(?) (or at least verified at some point) user, horray! #}
{% else %}
{%- trans %}No active reports filed on {% endtrans -%} {{ user.username }}
{% endif %}
- <a href="{{ request.urlgen('mediagoblin.moderation.reports') }}?active_reported_user={{user.id}}&closed_reported_user={{user.id}}"
- class="right_align">{{ user.username }}'s report history</a>
+ <span class="right_align">
+ <a href="{{ request.urlgen(
+ 'mediagoblin.moderation.reports') }}?reported_user={{user.id}}">
+ {%- trans
+ username=user.username %}All reports on {{ username }}{% endtrans %}</a>
+ ·
+ <a href="{{ request.urlgen(
+ 'mediagoblin.moderation.reports') }}?reporter={{user.id}}">
+ {%- trans
+ username=user.username %}All reports that {{ username }} has filed{% endtrans %}</a>
+ </span>
<span class=clear></span>
<h2>{{ user.username }}'s Privileges</h2>
<form method=POST action="{{ request.urlgen(
{% endblock %}
{% block mediagoblin_content -%}
-<h2>The gist</h2>
+{# <h2>The gist</h2>
+# This is where you might insert your own particular rules, unique to your
+# own website. Or your own worded summary.
+#}
<h2>Terms of Service</h2>
that may be published from time to time on this Site by Operator (collectively,
the “Agreement”).
-Please read this Agreement carefully before accessing or using the Website. By accessing or using any part of the web site, you agree to become bound by the terms and conditions of this agreement. If you do not agree to all the terms and conditions of this agreement, then you may not access the Website or use any services. If these terms and conditions are considered an offer by Operator, acceptance is expressly limited to these terms. The Website is available only to individuals who are at least 13 years old.
+Please read this Agreement carefully before accessing or using the Website.
+By accessing or using any part of the web site, you agree to become bound by
+the terms and conditions of this agreement. If you do not agree to all the
+terms and conditions of this agreement, then you may not access the Website
+or use any services. If these terms and conditions are considered an offer by
+Operator, acceptance is expressly limited to these terms. The Website is
+available only to individuals who are at least 13 years old.
<ol id="code_of_conduct_list">
- <li><strong>Your {{ app_config['html_title'] }} Account and Site.</strong> If you create a
- notice stream on the Website, you are responsible for maintaining the
- security of your account and notice stream, and you are fully responsible
- for all activities that occur under the account and any other actions taken
- in connection with the notice stream. You must not describe or assign
- keywords to your notice stream in a misleading or unlawful manner,
+ <li><strong>Your {{ app_config['html_title'] }} Account and Site.</strong>
+ If you create a notice stream on the Website, you are responsible for
+ maintaining the security of your account and notice stream, and you are
+ fully responsible for all activities that occur under the account and any
+ other actions taken in connection with the notice stream. You must not
+ describe or assign keywords to your notice stream in a misleading or
+ unlawful manner,
including in a manner intended to trade on the name or reputation of
others, and Operator may change or remove any description or keyword that
it considers inappropriate or unlawful, or otherwise likely to cause
including any damages of any kind incurred as a result of such acts or
omissions.
</li>
- <li><strong>Responsibility of Contributors.</strong> If you operate a notice stream, comment
- on a notice stream, post material to the Website, post links on the
- Website, or otherwise make (or allow any third party to make) material
+ <li><strong>Responsibility of Contributors.</strong> If you operate a notice
+ stream, comment on a notice stream, post material to the Website, post
+ links on the Website, or otherwise make
+ (or allow any third party to make) material
available by means of the Website (any such material, “Content”), You are
entirely responsible for the content of, and any harm resulting from, that
Content. That is the case regardless of whether the Content in question
(ii) terminate or deny access to and use of the Website to any individual
or entity for any reason, in Operator’s sole discretion.
</li>
- <li><strong>Responsibility of Website Visitors.</strong> Operator has not reviewed, and cannot
+ <li><strong>Responsibility of Website Visitors.</strong> Operator has not
+ reviewed, and cannot
review, all of the material, including computer software, posted to the
Website, and cannot therefore be responsible for that material’s content,
use or effects. By operating the Website, Operator does not represent or
visitors of the Website, or from any downloading by those visitors of
content there posted.
</li>
- <li><strong>Content Posted on Other Websites.</strong> We have not reviewed, and cannot
+ <li><strong>Content Posted on Other Websites.</strong> We have not reviewed,
+ and cannot
review, all of the material, including computer software, made available
through the websites and webpages to which {{ app_config['html_title'] }}
links, and that link to {{ app_config['html_title'] }}. Operator does not
disclaims any responsibility for any harm resulting from your use of
external websites and webpages.
</li>
- <li><strong>Copyright Infringement and DMCA Policy.</strong> As Operator asks others to
+ <li><strong>Copyright Infringement and DMCA Policy.</strong> As Operator asks
+ others to
respect its intellectual property rights, it respects the intellectual
property rights of others. If you believe that material located on or
linked to by {{ app_config['html_title'] }} violates your copyright, you
the Website. In the case of such termination, Operator will have no
obligation to provide a refund of any amounts previously paid to Operator.
</li>
- <li><strong>Intellectual Property.</strong> This Agreement does not transfer from Operator to
+ <li><strong>Intellectual Property.</strong> This Agreement does not transfer
+ from Operator to
you any Operator or third party intellectual property, and all right,
title and interest in and to such property will remain (as between the
parties) solely with Operator. {{ app_config['html_title'] }}, the
Website grants you no right or license to reproduce or otherwise use any
Operator or third-party trademarks.
</li>
- <li><strong>Changes.</strong> Operator reserves the right, at its sole discretion, to modify
+ <li><strong>Changes.</strong> Operator reserves the right, at its sole
+ discretion, to modify
or replace any part of this Agreement. It is your responsibility to check
this Agreement periodically for changes. Your continued use of or access
to the Website following the posting of any changes to this Agreement
release of new tools and resources). Such new features and/or services
shall be subject to the terms and conditions of this Agreement.
</li>
- <li><strong>Termination.</strong> Operator may terminate your access to all or any part of
+ <li><strong>Termination.</strong> Operator may terminate your access to all
+ or any part of
the Website at any time, with or without cause, with or without notice,
effective immediately. If you wish to terminate this Agreement or your
{{ app_config['html_title'] }} account (if you have one), you may simply
including, without limitation, ownership provisions, warranty disclaimers,
indemnity and limitations of liability.
</li>
- <li><strong>Disclaimer of Warranties.</strong> The Website is provided “as is”. Operator and
+ <li><strong>Disclaimer of Warranties.</strong> The Website is provided
+ “as is”. Operator and
its suppliers and licensors hereby disclaim all warranties of any kind,
express or implied, including, without limitation, the warranties of
merchantability, fitness for a particular purpose and non-infringement.
understand that you download from, or otherwise obtain content or services
through, the Website at your own discretion and risk.
</li>
- <li><strong>Limitation of Liability.</strong> In no event will Operator, or its suppliers or
+ <li><strong>Limitation of Liability.</strong> In no event will Operator, or
+ its suppliers or
licensors, be liable with respect to any subject matter of this agreement
under any contract, negligence, strict liability or other legal or
equitable theory for: (i) any special, incidental or consequential damages;
reasonable control. The foregoing shall not apply to the extent prohibited
by applicable law.
</li>
- <li><strong>General Representation and Warranty.</strong> You represent and warrant that (i)
+ <li><strong>General Representation and Warranty.</strong> You represent and
+ warrant that (i)
your use of the Website will be in strict accordance with the Operator
Privacy Policy, with this Agreement and with all applicable laws and
regulations (including without limitation any local laws or regulations in
infringe or misappropriate the intellectual property rights of any third
party.
</li>
- <li><strong>Indemnification.</strong> You agree to indemnify and hold harmless Operator, its
+ <li><strong>Indemnification.</strong> You agree to indemnify and hold
+ harmless Operator, its
contractors, and its licensors, and their respective directors, officers,
employees and agents from and against any and all claims and expenses,
including attorneys’ fees, arising out of your use of the Website,
including but not limited to out of your violation this Agreement.
</li>
- <li><strong>Miscellaneous.</strong> This Agreement constitutes the entire agreement between
+ <li><strong>Miscellaneous.</strong> This Agreement constitutes the entire
+ agreement between
Operator and you concerning the subject matter hereof, and they may only
be modified by a written amendment signed by an authorized executive of
Operator, or by the posting by Operator of a revised version. If any part
<p>{% trans %}Sorry, no such user found.{% endtrans %}</p>
{# User exists, but needs verification #}
- {% elif not user.status.has_privilege('active') %}
+ {% elif not user.has_privilege('active') %}
{% if user == request.user %}
{# this should only be visible when you are this user #}
<div class="form_box">
def testAllModerationViews(self):
self.login(u'moderator')
username = self.user.username
+ self.query_for_users()
fixture_add_comment_report(reported_user=self.admin_user)
response = self.test_app.get('/mod/reports/')
assert response.status == "200 OK"
assert response.status == "302 FOUND"
user_banned = UserBan.query.filter(UserBan.user_id==user_id).first()
assert user_banned is None
-
if report_content is None:
report_content = \
- 'Auto-generated test report by user {0}'.format(
- reporter)
+ 'Auto-generated test report'
comment_report = CommentReport(comment=comment,
reported_user = reported_user,
template_name = request.matchdict['template']
return render_to_response(
request, template_name, {})
+
+def terms_of_service(request):
+ return render_to_response(request,
+ 'mediagoblin/terms_of_service.html', {})