`_ and branch the development branch.
-After You have complited the task create a pull request and ask someone to review the code from other developers.
+After You have completed the task, create a pull request and ask someone to review the code from other developers.
**Cheat sheet for branching and forking**:
diff --git a/datacenterlight/views.py b/datacenterlight/views.py
index 51466d93..301049aa 100644
--- a/datacenterlight/views.py
+++ b/datacenterlight/views.py
@@ -625,6 +625,7 @@ class OrderConfirmationView(DetailView, FormView):
vm_specs["vat_country"] = user_vat_country
vm_specs["discount"] = discount
vm_specs["total_price"] = round(price + vat - discount['amount'], 2)
+ request.session['specs'] = vm_specs
context.update({
'vm': vm_specs,
diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py
index fc971141..bdbb8f8f 100644
--- a/dynamicweb/settings/base.py
+++ b/dynamicweb/settings/base.py
@@ -52,7 +52,7 @@ PROJECT_DIR = os.path.abspath(
)
# load .env file
-dotenv.read_dotenv("{0}/.env".format(PROJECT_DIR))
+dotenv.load_dotenv("{0}/.env".format(PROJECT_DIR))
from multisite import SiteID
@@ -244,8 +244,9 @@ DATABASES = {
}
AUTHENTICATION_BACKENDS = (
+ 'utils.backend.MyLDAPBackend',
'guardian.backends.ObjectPermissionBackend',
- 'django.contrib.auth.backends.ModelBackend',
+
)
# Internationalization
@@ -721,6 +722,31 @@ X_FRAME_OPTIONS = ('SAMEORIGIN' if X_FRAME_OPTIONS_ALLOW_FROM_URI is None else
DEBUG = bool_env('DEBUG')
+
+# LDAP setup
+LDAP_ADMIN_DN = env('LDAP_ADMIN_DN')
+LDAP_ADMIN_PASSWORD = env('LDAP_ADMIN_PASSWORD')
+AUTH_LDAP_SERVER = env('LDAPSERVER')
+
+LDAP_CUSTOMER_DN = env('LDAP_CUSTOMER_DN')
+LDAP_CUSTOMER_GROUP_ID = int(env('LDAP_CUSTOMER_GROUP_ID'))
+LDAP_MAX_UID_FILE_PATH = os.environ.get('LDAP_MAX_UID_FILE_PATH',
+ os.path.join(os.path.abspath(os.path.dirname(__file__)), 'ldap_max_uid_file')
+)
+LDAP_DEFAULT_START_UID = int(env('LDAP_DEFAULT_START_UID'))
+
+# Search union over OUs
+AUTH_LDAP_START_TLS = bool(os.environ.get('LDAP_USE_TLS', False))
+
+ENTIRE_SEARCH_BASE = env("ENTIRE_SEARCH_BASE")
+
+
+AUTH_LDAP_USER_ATTR_MAP = {
+ "first_name": "givenName",
+ "last_name": "sn",
+ "email": "mail"
+}
+
READ_VM_REALM = env('READ_VM_REALM')
AUTH_NAME = env('AUTH_NAME')
AUTH_SEED = env('AUTH_SEED')
diff --git a/hosting/static/hosting/css/dashboard.css b/hosting/static/hosting/css/dashboard.css
index c7bbecd9..0b718178 100644
--- a/hosting/static/hosting/css/dashboard.css
+++ b/hosting/static/hosting/css/dashboard.css
@@ -23,7 +23,6 @@
.hosting-dashboard .dashboard-container-head {
color: #fff;
- margin-bottom: 60px;
}
.hosting-dashboard-item {
diff --git a/hosting/static/hosting/css/virtual-machine.css b/hosting/static/hosting/css/virtual-machine.css
index 726b0f35..4d490ff7 100644
--- a/hosting/static/hosting/css/virtual-machine.css
+++ b/hosting/static/hosting/css/virtual-machine.css
@@ -248,6 +248,9 @@
.dashboard-title-thin {
font-size: 22px;
}
+ .dashboard-greetings-thin {
+ font-size: 16px;
+ }
}
.btn-vm-invoice {
@@ -315,6 +318,11 @@
font-size: 32px;
}
+.dashboard-greetings-thin {
+ font-weight: 300;
+ font-size: 24px;
+}
+
.dashboard-title-thin .un-icon {
height: 34px;
margin-right: 5px;
@@ -411,6 +419,9 @@
.dashboard-title-thin {
font-size: 22px;
}
+ .dashboard-greetings-thin {
+ font-size: 16px;
+ }
.dashboard-title-thin .un-icon {
height: 22px;
width: 22px;
diff --git a/hosting/templates/hosting/dashboard.html b/hosting/templates/hosting/dashboard.html
index 35ee9b6e..bda6eb11 100644
--- a/hosting/templates/hosting/dashboard.html
+++ b/hosting/templates/hosting/dashboard.html
@@ -7,6 +7,9 @@
{% trans "My Dashboard" %}
+
+ {% trans "Welcome" %} {{request.user.name}}
+