Compare commits

..

4 Commits

Author SHA1 Message Date
R. Miles McCain
4a06357137 Bump version 2020-08-19 23:08:45 +00:00
Nicholas Bentley
29ac82a91b smtp ssl/tls fix 2020-08-18 23:34:20 -04:00
R. Miles McCain
fecea17a9d Bump version 2020-08-18 15:42:17 +00:00
R. Miles McCain
03062e3de5 Fix session detail page for collaborators (fixes #74) 2020-08-18 15:41:50 +00:00
3 changed files with 10 additions and 3 deletions

View File

@@ -14,7 +14,10 @@ EMAIL_HOST_USER=example
EMAIL_HOST_PASSWORD=example_password EMAIL_HOST_PASSWORD=example_password
EMAIL_HOST=smtp.example.com EMAIL_HOST=smtp.example.com
EMAIL_PORT=465 EMAIL_PORT=465
SERVER_EMAIL=<Shynet> noreply@shynet.example.com EMAIL_USE_SSL=True
# Comment out EMAIL_USE_SSL & uncomment EMAIL_USE_TLS if your SMTP server uses TLS.
# EMAIL_USE_TLS=True
SERVER_EMAIL=Shynet <noreply@shynet.example.com>
# General Django settings # General Django settings
DJANGO_SECRET_KEY=random_string DJANGO_SECRET_KEY=random_string

View File

@@ -139,6 +139,9 @@ class ServiceSessionView(LoginRequiredMixin, PermissionRequiredMixin, DetailView
context_object_name = "session" context_object_name = "session"
permission_required = "core.view_service" permission_required = "core.view_service"
def get_permission_object(self, **kwargs):
return self.get_object().service
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
data = super().get_context_data(**kwargs) data = super().get_context_data(**kwargs)
data["object"] = get_object_or_404(Service, pk=self.kwargs.get("pk")) data["object"] = get_object_or_404(Service, pk=self.kwargs.get("pk"))

View File

@@ -18,7 +18,7 @@ import urllib.parse as urlparse
from django.contrib.messages import constants as messages from django.contrib.messages import constants as messages
# Increment on new releases # Increment on new releases
VERSION = "v0.6.2" VERSION = "v0.6.4"
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -279,7 +279,8 @@ else:
EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 465)) EMAIL_PORT = int(os.environ.get("EMAIL_PORT", 465))
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER") EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD") EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
EMAIL_USE_SSL = True EMAIL_USE_SSL = os.environ.get("EMAIL_USE_SSL")
EMAIL_USE_TLS = os.environ.get("EMAIL_USE_TLS")
# NPM # NPM