Commit 7efa2822 by Douglas Hall Committed by GitHub

Merge pull request #13634 from open-craft/bdero/saml-hotfix

Hotfix: Remove is_enabled check for SAMLConfiguration in SAML management command
parents d9f3c70e ec6c924b
...@@ -4,7 +4,6 @@ Management commands for third_party_auth ...@@ -4,7 +4,6 @@ Management commands for third_party_auth
""" """
from django.core.management.base import BaseCommand, CommandError from django.core.management.base import BaseCommand, CommandError
import logging import logging
from third_party_auth.models import SAMLConfiguration
from third_party_auth.tasks import fetch_saml_metadata from third_party_auth.tasks import fetch_saml_metadata
...@@ -16,9 +15,6 @@ class Command(BaseCommand): ...@@ -16,9 +15,6 @@ class Command(BaseCommand):
parser.add_argument('--pull', action='store_true', help="Pull updated metadata from external IDPs") parser.add_argument('--pull', action='store_true', help="Pull updated metadata from external IDPs")
def handle(self, *args, **options): def handle(self, *args, **options):
if not SAMLConfiguration.is_enabled():
raise CommandError("SAML support is disabled via SAMLConfiguration.")
if options['pull']: if options['pull']:
log_handler = logging.StreamHandler(self.stdout) log_handler = logging.StreamHandler(self.stdout)
log_handler.setLevel(logging.DEBUG) log_handler.setLevel(logging.DEBUG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment