|
|
@@ -92,11 +92,11 @@ def samlgroup_check(request):
|
|
|
LOG.info("Empty userprofile data for %s user" % (request.user.username))
|
|
|
return False
|
|
|
|
|
|
- if json_data.get('saml_attributes', False):
|
|
|
+ if not json_data.get('saml_attributes', False):
|
|
|
LOG.info("Empty saml_attributes data for %s user" % request.user.username)
|
|
|
return False
|
|
|
|
|
|
- if json_data['saml_attributes'].get(REQUIRED_GROUPS_ATTRIBUTE.get(), False):
|
|
|
+ if not json_data['saml_attributes'].get(REQUIRED_GROUPS_ATTRIBUTE.get(), False):
|
|
|
LOG.info("Missing %s in SAMLResponse for %s user" % (REQUIRED_GROUPS_ATTRIBUTE.get(), request.user.username))
|
|
|
return False
|
|
|
|