Commit 5c8d2fbc authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Merge branch 'master' into packaging

parents 27993be5 5a6f91fc
......@@ -26,7 +26,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION = (0, 2, 0, 'alpha', 0)
VERSION = (0, 3, 0, 'alpha', 0)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
......
......@@ -30,6 +30,7 @@
# documentation are those of the authors and should not be
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
from urlparse import urljoin
from django import forms
from django.utils.translation import ugettext as _
......@@ -222,14 +223,16 @@ class ExtendedPasswordResetForm(PasswordResetForm):
Generates a one-use only link for resetting password and sends to the user.
"""
for user in self.users_cache:
url = urljoin(BASEURL,
'/im/local/reset/confirm/%s-%s' %(int_to_base36(user.id),
token_generator.make_token(user)))
t = loader.get_template(email_template_name)
c = {
'email': user.email,
'domain': BASEURL,
'url': url,
'site_name': SITENAME,
'uid': int_to_base36(user.id),
'user': user,
'token': token_generator.make_token(user)
'baseurl': BASEURL
}
from_email = DEFAULT_FROM_EMAIL
send_mail(_("Password reset on %s") % SITENAME,
......
......@@ -37,6 +37,7 @@ INVITATIONS_ENABLED = getattr(settings, 'ASTAKOS_INVITATIONS_ENABLED', True)
COOKIE_NAME = getattr(settings, 'ASTAKOS_COOKIE_NAME', '_pithos2_a')
COOKIE_DOMAIN = getattr(settings, 'ASTAKOS_COOKIE_DOMAIN', None)
COOKIE_SECURE = getattr(settings, 'ASTAKOS_COOKIE_SECURE', True)
IM_STATIC_URL = getattr(settings, 'ASTAKOS_IM_STATIC_URL', '/im/static/im/')
......
......@@ -3,7 +3,7 @@
για την υπηρεσία {{ site_name }} της ΕΔΕΤ κατά την Alpha (πιλοτική) φάση λειτουργίας της,
χρησιμοποιήστε τον παρακάτω σύνδεσμο:
{{ domain }}im/local/reset/confirm/{{ uid }}-{{ token }}/
{{url}}
Σημείωση:
......@@ -17,7 +17,7 @@
έκδοση Alpha στην έκδοση Beta. Θα υπάρξει έγκαιρη ειδοποίησή σας πριν
από τη μετάβαση αυτή.
Περισσότερα για την υπηρεσία θα βρείτε στο {{ domain }}/, αφού
Περισσότερα για την υπηρεσία θα βρείτε στο {{ baseurl }}, αφού
ενεργοποιήσετε την πρόσκλησή σας.
Για όποιες παρατηρήσεις ή προβλήματα στη λειτουργεία της υπηρεσίας μπορείτε να
......@@ -36,7 +36,7 @@
You can use the following link:
{{ domain }}/local/reset/confirm/{{ uid }}-{{ token }}/
{{ url }}
to reset your password for GRNET's {{ site_name }} service has been created
for its Alpha test phase.
......@@ -53,7 +53,7 @@ request you not to transfer important files to {{ site_name}} yet.
Also, please bear in mind that all data will be deleted when the service moves to Beta.
We will notify you before the transition.
For more information, please visit {{ domain }}/, after
For more information, please visit {{ baseurl }}, after
activating your invitation.
We look forward to your feedback, to improve the functionality and
......
......@@ -47,7 +47,7 @@ from django.contrib.auth import login, authenticate
from django.core.urlresolvers import reverse
from astakos.im.models import AstakosUser, Invitation
from astakos.im.settings import INVITATIONS_PER_LEVEL, COOKIE_NAME, COOKIE_DOMAIN, FORCE_PROFILE_UPDATE
from astakos.im.settings import INVITATIONS_PER_LEVEL, COOKIE_NAME, COOKIE_DOMAIN, COOKIE_SECURE, FORCE_PROFILE_UPDATE
logger = logging.getLogger(__name__)
......@@ -160,4 +160,4 @@ def set_cookie(response, user):
cookie_value = quote(user.email + '|' + user.auth_token)
response.set_cookie(COOKIE_NAME, value=cookie_value,
expires=expire_fmt, path='/',
domain=COOKIE_DOMAIN)
\ No newline at end of file
domain=COOKIE_DOMAIN, secure=COOKIE_SECURE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment