Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multi-tenants #22

Closed
smirolo opened this issue Jan 14, 2019 · 2 comments
Closed

support multi-tenants #22

smirolo opened this issue Jan 14, 2019 · 2 comments

Comments

@smirolo
Copy link
Contributor

smirolo commented Jan 14, 2019

In signup/settings.py, DISABLED_AUTHENTICATION, DISABLED_REGISTRATION are used to enable/disable authentication and registration globally. This needs to be changed to use the output of a function instead. The function will look like the following in saas/models.py:

def get_broker():
    """
    Returns the site-wide provider from a request.
    """
    from saas.compat import import_string
    LOGGER.debug("get_broker('%s')", settings.BROKER_CALLABLE)
    try:
        return import_string(settings.BROKER_CALLABLE)()
    except ImportError:
        pass
    return Organization.objects.get(slug=settings.BROKER_CALLABLE)
@knivets
Copy link
Contributor

knivets commented Jan 16, 2019

What exactly needs to be changed? Should the values of DISABLED_AUTHENTICATION and DISABLED_REGISTRATION be populated by calling a function or what? Not sure what to do here.

@smirolo
Copy link
Contributor Author

smirolo commented Jan 23, 2019

see commit e59cc61

@smirolo smirolo closed this as completed Jan 23, 2019
knivets added a commit to knivets/djaodjin-signup that referenced this issue Jan 23, 2019
smirolo added a commit that referenced this issue Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants