restart dnsmasq on change; add bbs_addrs to yaml
diff --git a/xos/core/admin.py b/xos/core/admin.py
index a3aea48..f48a7f5 100644
--- a/xos/core/admin.py
+++ b/xos/core/admin.py
@@ -1305,7 +1305,7 @@
list_filter = ('site',)
inlines = [SlicePrivilegeInline,SitePrivilegeInline]
admin_inlines = [ControllerUserInline]
- fieldListLoginDetails = ['backend_status_text', 'email', 'site','password','is_active','is_readonly','is_admin','is_appuser', 'public_key', 'profile']
+ fieldListLoginDetails = ['backend_status_text', 'email', 'site','password','is_active','is_readonly','is_admin','is_appuser', 'public_key', 'login_page', 'profile']
fieldListContactInfo = ['firstname','lastname','phone','timezone']
fieldsets = (
diff --git a/xos/core/dashboard/sites.py b/xos/core/dashboard/sites.py
index 550c79f..3e62ed9 100644
--- a/xos/core/dashboard/sites.py
+++ b/xos/core/dashboard/sites.py
@@ -12,7 +12,7 @@
def get_urls(self):
"""Add our dashboard view to the admin urlconf. Deleted the default index."""
from django.conf.urls import patterns, url
- from views import DashboardCustomize, DashboardDynamicView, SimulatorView, \
+ from views import DashboardCustomize, DashboardDynamicView, SimulatorView, LoggedInView, \
DashboardUserSiteView, \
TenantViewData, TenantCreateSlice, TenantAddUser,TenantAddOrRemoveSliverView, TenantPickSitesView, TenantDeleteSliceView, \
TenantUpdateSlice, DashboardSliceInteractions, RequestAccessView
@@ -27,6 +27,8 @@
dashboard_urls = [
url(r'^$', self.admin_view(DashboardDynamicView.as_view()),
name="index"),
+ url(r'^loggedin/$', self.admin_view(LoggedInView.as_view()),
+ name="index"),
url(r'^test/', self.admin_view(DashboardUserSiteView.as_view()),
name="test"),
url(r'^sliceinteractions/(?P<name>\w+)/$', self.admin_view(DashboardSliceInteractions.as_view()),
diff --git a/xos/core/dashboard/views/home.py b/xos/core/dashboard/views/home.py
index 8c20e80..e67fb03 100644
--- a/xos/core/dashboard/views/home.py
+++ b/xos/core/dashboard/views/home.py
@@ -1,4 +1,12 @@
from view_common import *
+from django.http import HttpResponseRedirect
+
+class LoggedInView(TemplateView):
+ def get(self, request, name="root", *args, **kwargs):
+ if request.user.login_page:
+ return HttpResponseRedirect(request.user.login_page)
+ else:
+ return HttpResponseRedirect("/admin/")
class DashboardDynamicView(TemplateView):
head_template = r"""{% extends "admin/dashboard/dashboard_base.html" %}
diff --git a/xos/core/models/user.py b/xos/core/models/user.py
index 32e3e7d..4f8cfa9 100644
--- a/xos/core/models/user.py
+++ b/xos/core/models/user.py
@@ -117,6 +117,8 @@
is_registering = models.BooleanField(default=False)
is_appuser = models.BooleanField(default=False)
+ login_page = StrippedCharField(help_text="send this user to a specific page on login", max_length=200, null=True, blank=True)
+
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
enacted = models.DateTimeField(null=True, default=None)
diff --git a/xos/observers/vcpe/steps/sync_vcpetenant.yaml b/xos/observers/vcpe/steps/sync_vcpetenant.yaml
index 4d26f01..1d748d7 100644
--- a/xos/observers/vcpe/steps/sync_vcpetenant.yaml
+++ b/xos/observers/vcpe/steps/sync_vcpetenant.yaml
@@ -21,6 +21,10 @@
{% for prefix in cdn_prefixes %}
- {{ prefix }}
{% endfor %}
+ bbs_addrs:
+ {% for bbs_addr in bbs_addrs %}
+ - {{ bbs_addr }}
+ {% endfor %}
nat_ip: {{ nat_ip }}
lan_ip: {{ lan_ip }}
wan_ip: {{ wan_ip }}
@@ -72,7 +76,7 @@
- name: dnsmasq config
template: src=/opt/xos/observers/vcpe/templates/dnsmasq_servers.j2 dest=/etc/dnsmasq.d/servers.conf owner=root group=root
notify:
- - reload dnsmasq config
+ - restart vcpe
# These are samples, not necessary for correct function of demo
diff --git a/xos/xos/settings.py b/xos/xos/settings.py
index 3d0e85a..2a7faa3 100644
--- a/xos/xos/settings.py
+++ b/xos/xos/settings.py
@@ -16,7 +16,8 @@
# ('Your Name', 'your_email@example.com'),
)
-LOGIN_REDIRECT_URL = '/admin/core/user'
+#LOGIN_REDIRECT_URL = '/admin/core/user'
+LOGIN_REDIRECT_URL = '/admin/loggedin/'
MANAGERS = ADMINS