Merge branch 'master' of github.com:Gluejar/regluit
commit
9dc8a5c42a
|
@ -0,0 +1,83 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIFAzCCA+ugAwIBAgIQGLLLuqME8aAPwfLzJkYqSjANBgkqhkiG9w0BAQUFADCB
|
||||
gTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
|
||||
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNV
|
||||
BAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEyMDEwMDAw
|
||||
MDBaFw0xOTEyMzEyMzU5NTlaMHIxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVh
|
||||
dGVyIE1hbmNoZXN0ZXIxEDAOBgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9E
|
||||
TyBDQSBMaW1pdGVkMRgwFgYDVQQDEw9Fc3NlbnRpYWxTU0wgQ0EwggEiMA0GCSqG
|
||||
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCt8AiwcsargxIxF3CJhakgEtSYau2A1NHf
|
||||
5I5ZLdOWIY120j8YC0YZYwvHIPPlC92AGvFaoL0dds23Izp0XmEbdaqb1IX04XiR
|
||||
0y3hr/yYLgbSeT1awB8hLRyuIVPGOqchfr7tZ291HRqfalsGs2rjsQuqag7nbWzD
|
||||
ypWMN84hHzWQfdvaGlyoiBSyD8gSIF/F03/o4Tjg27z5H6Gq1huQByH6RSRQXScq
|
||||
oChBRVt9vKCiL6qbfltTxfEFFld+Edc7tNkBdtzffRDPUanlOPJ7FAB1WfnwWdsX
|
||||
Pvev5gItpHnBXaIcw5rIp6gLSApqLn8tl2X2xQScRMiZln5+pN0vAgMBAAGjggGD
|
||||
MIIBfzAfBgNVHSMEGDAWgBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAdBgNVHQ4EFgQU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AECjAIMAYGBFUdIAAwbQYD
|
||||
VR0fBGYwZDAxoC+gLYYraHR0cDovL2NybC5jb21vZG9jYS5jb20vVVROLURBVEFD
|
||||
b3JwU0dDLmNybDAvoC2gK4YpaHR0cDovL2NybC5jb21vZG8ubmV0L1VUTi1EQVRB
|
||||
Q29ycFNHQy5jcmwwDQYJKoZIhvcNAQEFBQADggEBANheksSuFNxDrcKkw2dFBx35
|
||||
N6IZxxw3NZETHAfEfUKmDvCGXENrDkTPviRhOkKpzp1Mr3k5cN0OBCBOlZw83rdg
|
||||
umNDQO1qD4FJRrsek8BL8/jhNkkbb7YMDfKQV4r8bZPyKMf6hgoosxcOWYoutr/N
|
||||
4axMZmzyVZFWtzK/seR9teg6ti/bspzaUJOOTsWsmn5cnhI8O03GUHCzZSuO92uh
|
||||
uyXAALv17BZlgQ771KMhlneaqHS8U6rCOVD/CwIJYcyVt9eIavZcxWjTFJUaR1/Z
|
||||
+y3kL48ThqsxE0ATrG7ttRAwixtQqc7ujMrrfLW5Fj3U+m+SbR6ivfsCSsVwvvE=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEpjCCA46gAwIBAgIQRurwlgVMxeP6Zepun0LGZDANBgkqhkiG9w0BAQUFADBv
|
||||
MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk
|
||||
ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF
|
||||
eHRlcm5hbCBDQSBSb290MB4XDTA1MDYwNzA4MDkxMFoXDTIwMDUzMDEwNDgzOFow
|
||||
gZMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtl
|
||||
IENpdHkxHjAcBgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMY
|
||||
aHR0cDovL3d3dy51c2VydHJ1c3Qu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5Z9abIYPo6t
|
||||
VlB+99Ww/zliZYKMllfDj/dg9sKNNIf8T0Pl278cqvaGzebfET+NB/dtgxPAOIg5
|
||||
YKF+MOHjiD6ku2NvLOmKaCzulmmsBGHhT04OnXJM9nk4yMdIaW+UD3S0vMjPV025
|
||||
dXGWDYoGC+vd0PA8fcYumEZqOMcCtci4smV13tqQCLZ3uFMAJctHynNf
|
||||
-----END CERTIFICATE-----
|
|
@ -790,6 +790,18 @@ class Work(models.Model):
|
|||
if self.ebooks().filter(edition__unglued=True):
|
||||
return True
|
||||
return False
|
||||
|
||||
@property
|
||||
def user_with_rights(self):
|
||||
"""
|
||||
return queryset of users (should be at most one) who act for rights holders with active claims to the work
|
||||
"""
|
||||
claims = self.claim.filter(status='active')
|
||||
assert claims.count() < 2, "There is more than one active claim on %r" % self.title
|
||||
try:
|
||||
return claims[0].user
|
||||
except:
|
||||
return False
|
||||
|
||||
class Author(models.Model):
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
|
|
|
@ -3,15 +3,15 @@ WSGISocketPrefix /opt/regluit
|
|||
|
||||
<VirtualHost *:80>
|
||||
|
||||
ServerName just.unglueit.com
|
||||
ServerName just.unglue.it
|
||||
ServerAdmin info@gluejar.com
|
||||
|
||||
RewriteEngine On
|
||||
RewriteRule ^/$ https://just.unglueit.com/ [R=301]
|
||||
RewriteRule /admin(.*) https://just.unglueit.com/admin$1 [R=301]
|
||||
RewriteRule /accounts(.*) https://just.unglueit.com/accounts$1 [R=301]
|
||||
RewriteRule /pledge(.*) https://just.unglueit.com/pledge$1 [R=301]
|
||||
RewriteRule /donation(.*) https://just.unglueit.com/donation$1 [R=301]
|
||||
RewriteRule ^/$ https://just.unglue.it/ [R=301]
|
||||
RewriteRule /admin(.*) https://just.unglue.it/admin$1 [R=301]
|
||||
RewriteRule /accounts(.*) https://just.unglue.it/accounts$1 [R=301]
|
||||
RewriteRule /pledge(.*) https://just.unglue.it/pledge$1 [R=301]
|
||||
RewriteRule /donation(.*) https://just.unglue.it/donation$1 [R=301]
|
||||
|
||||
WSGIDaemonProcess regluit processes=4 threads=4 python-eggs=/tmp/regluit-python-eggs
|
||||
WSGIScriptAlias / /opt/regluit/deploy/just.wsgi
|
||||
|
@ -34,7 +34,7 @@ Alias /static /var/www/static
|
|||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
#SSLCertificateChainFile /etc/ssl/certs/gd_bundle.crt
|
||||
SSLCertificateChainFile /etc/ssl/certs/STAR_unglue_it.ca-bundle
|
||||
|
||||
WSGIDaemonProcess regluit-ssl processes=4 threads=4 python-eggs=/tmp/regluit-python-eggs
|
||||
WSGIScriptAlias / /opt/regluit/deploy/just.wsgi
|
||||
|
|
|
@ -41,7 +41,7 @@ CustomLog ${APACHE_LOG_DIR}/unglue.it-access.log combined
|
|||
SSLEngine on
|
||||
SSLCertificateFile /etc/ssl/certs/server.crt
|
||||
SSLCertificateKeyFile /etc/ssl/private/server.key
|
||||
SSLCertificateChainFile /etc/ssl/certs/gd_bundle.crt
|
||||
SSLCertificateChainFile /etc/ssl/certs/STAR_unglue_it.ca-bundle
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
|
|
|
@ -20,6 +20,19 @@
|
|||
Any questions not covered here? Please email us at <a href="mailto:rights@gluejar.com">rights@gluejar.com</a>.
|
||||
</div></div>
|
||||
|
||||
<h2>Getting started</h2>
|
||||
<p>
|
||||
<a href="/static/images/How_to_claim_your_work.mp4">How to claim your work</a> (screencast)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/static/images/How_to_set_up_your_campaign.mp4">How to set up your campaign</a> (screencast)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/static/images/How_to_embed_a_widget.mp4">How to embed a widget for your book</a> in your blog, web site, etc. (screencast)
|
||||
</p>
|
||||
|
||||
{% if campaigns %}
|
||||
<h2>Campaigns You Manage</h2>
|
||||
<dl>
|
||||
|
|
|
@ -40,8 +40,24 @@ $j(document).ready(function(){
|
|||
{% endblock %}
|
||||
|
||||
{% block topsection %}
|
||||
{% if request.user in work.last_campaign.managers.all and work.last_campaign.status != 'SUCCESSFUL' %}
|
||||
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're a manager for this campaign, you can <a href="{% url manage_campaign id=work.last_campaign.id %}">edit this campaign</a>.</div>
|
||||
{% if work.last_campaign.status == 'ACTIVE' %}
|
||||
{% if request.user in work.last_campaign.managers.all %}
|
||||
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're a manager for this campaign, you can <a href="{% url manage_campaign id=work.last_campaign.id %}">edit this campaign</a>.</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if not work.user_with_rights %}
|
||||
{% if request.user.rights_holder.all %}
|
||||
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're an authorized Unglue.it rights holder, if you own the worldwide electronic rights to this work, you may claim it through the Rights tab. Need help? There's a screencast of the process at the <a href="{% url rightsholders %}">rights holder tools page</a>.</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if request.user == work.user_with_rights %}
|
||||
{% ifequal work.last_campaign.status 'SUCCESSFUL' %}
|
||||
<div class="launch_top pale">Congratulations, {{ request.user.username }}; you successfully unglued this work! What are your plans for publicity and distribution? We're happy to brainstorm with you about next steps.</div>
|
||||
{% else %}
|
||||
<div class="launch_top pale">Hi, {{ request.user.username }}. Since you're a rights holder for this work, you can <a href="{% url rightsholders %}">launch a campaign</a>.</div>
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
# gen_csr.sh - Generate CSR for a host name.
|
||||
|
||||
HOSTNAME="$1";
|
||||
|
||||
if [ -z "${HOSTNAME}" ]; then
|
||||
echo "Usage : gen_csr.sh HOSTNAME";
|
||||
exit;
|
||||
fi
|
||||
|
||||
# Country Name (2 letter code) [GB]:.
|
||||
# State or Province Name (full name) [Berkshire]:.
|
||||
# Locality Name (eg, city) [Newbury]:.
|
||||
# Organization Name (eg, company) [My Company Ltd]:.
|
||||
# Organizational Unit Name (eg, section) []:.
|
||||
# Common Name (eg, your name or your server's hostname) []:.
|
||||
# Email Address []:.
|
||||
# A challenge password []:
|
||||
# An optional company name []:
|
||||
|
||||
COUNTRY="US";
|
||||
STATE="NJ";
|
||||
LOCALITY="Montclair";
|
||||
ORGNAME="Gluejar, Inc.";
|
||||
ORGUNIT="";
|
||||
CNAME=$HOSTNAME;
|
||||
EMAIL="support@gluejar.com";
|
||||
PASSWORD="";
|
||||
OPTION_COMPANY_NAME="";
|
||||
|
||||
echo "$COUNTRY
|
||||
$STATE
|
||||
$LOCALITY
|
||||
$ORGNAME
|
||||
$ORGUNIT
|
||||
$CNAME
|
||||
$EMAIL
|
||||
$PASSWORD
|
||||
$OPTIONAL_COMPANY_NAME" | openssl req -new -key $HOSTNAME.key -out $HOSTNAME.csr
|
||||
|
Loading…
Reference in New Issue