diff --git a/auth_saml/__manifest__.py b/auth_saml/__manifest__.py index d0ab4544d3..0bda48fa50 100644 --- a/auth_saml/__manifest__.py +++ b/auth_saml/__manifest__.py @@ -10,7 +10,7 @@ "maintainers": ["vincent-hatakeyama"], "website": "https://github.com/OCA/server-auth", "license": "AGPL-3", - "depends": ["base_setup"], + "depends": ["base_setup", "web"], "external_dependencies": { # Place an upper bound on cryptography version to be compatible with # pyopenssl 19 mentioned in Odoo 15's requirements.txt. If we don't do diff --git a/auth_saml/controllers/main.py b/auth_saml/controllers/main.py index fc79079d2d..529d0212ef 100644 --- a/auth_saml/controllers/main.py +++ b/auth_saml/controllers/main.py @@ -68,10 +68,6 @@ def list_saml_providers(self, with_autoredirect: bool = False) -> models.Model: domain.append(("autoredirect", "=", True)) providers = request.env["auth.saml.provider"].sudo().search_read(domain) - for provider in providers: - # Compatibility with auth_oauth/controllers/main.py in order to - # avoid KeyError rendering template_auth_oauth_providers - provider.setdefault("auth_link", "") return providers def _saml_autoredirect(self): @@ -131,7 +127,7 @@ def web_login(self, *args, **kw): else: error = None - response.qcontext["providers"] = providers + response.qcontext["saml_providers"] = providers if error: response.qcontext["error"] = error diff --git a/auth_saml/models/auth_saml_provider.py b/auth_saml/models/auth_saml_provider.py index 96e1960f88..2b9ebdb363 100644 --- a/auth_saml/models/auth_saml_provider.py +++ b/auth_saml/models/auth_saml_provider.py @@ -87,8 +87,11 @@ class AuthSamlProvider(models.Model): css_class = fields.Char( string="Button Icon CSS class", help="Add a CSS class that serves you to style the login button.", + default="fa fa-fw fa-sign-in text-primary", + ) + body = fields.Char( + string="Login button label", help="Link text in Login Dialog", translate=True ) - body = fields.Char(string="Button Description") autoredirect = fields.Boolean( "Automatic Redirection", default=False, diff --git a/auth_saml/readme/CONTRIBUTORS.rst b/auth_saml/readme/CONTRIBUTORS.rst index 5497e763ae..06bc9236f5 100644 --- a/auth_saml/readme/CONTRIBUTORS.rst +++ b/auth_saml/readme/CONTRIBUTORS.rst @@ -1,8 +1,10 @@ -* Florent Aide -* Vincent Hatakeyama -* Alexandre Brun +* XCG Consulting, part of `Orbeet `__: + + * Florent Aide + * Vincent Hatakeyama + * Alexandre Brun + * Houzéfa Abbasbhay * Jeremy Co Kim Len -* Houzéfa Abbasbhay * Jeffery Chen Fan * Bhavesh Odedra * `Tecnativa `__: diff --git a/auth_saml/views/auth_saml.xml b/auth_saml/views/auth_saml.xml index e4e2f99149..e0f4764a58 100644 --- a/auth_saml/views/auth_saml.xml +++ b/auth_saml/views/auth_saml.xml @@ -2,25 +2,28 @@