env['theme'] = self.theme
env['section'] = "Dashboard"
- username = request.POST.get('username')
+ username = request.POST.get('username').lower()
password = request.POST.get('password')
+
+ # LDAP form - If FIBRE, then get the possibilite to authenticate using usernameldap
+ #if self.theme == 'fibre':
+ usernameldap = request.POST.get('usernameldap')
+ token = {'usernameldap': usernameldap, 'username': username ,'password': password, 'request': request}
+ #else:
- # pass request within the token, so manifold session key can be attached to the request session.
- token = {'username': username, 'password': password, 'request': request}
+ # Follow original code
+ ## pass request within the token, so manifold session key can be attached to the request session.
+ #token = {'username': username, 'password': password, 'request': request}
# our authenticate function returns either
# . a ManifoldResult - when something has gone wrong, like e.g. backend is unreachable
def get (self, request, state=None):
env = self.default_env()
+ acc_auth_cred={}
if request.user.is_authenticated():
## check user is pi or not
platform_query = Query().get('local:platform').select('platform_id','platform','gateway_type','disabled')
account_details = execute_query(self.request, account_query)
for platform_detail in platform_details:
for account_detail in account_details:
- if 'platform_id' in platform_details:
+ if 'platform_id' in platform_detail:
if platform_detail['platform_id'] == account_detail['platform_id']:
if 'config' in account_detail and account_detail['config'] is not '':
account_config = json.loads(account_detail['config'])