Skip to content

Commit

Permalink
[MIG] website_require_login: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
NICO-SOLUTIONS committed Mar 23, 2024
1 parent 18458b8 commit 5c37526
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions website_require_login/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Contributors
------------

- Ooops404 <https://ooops404.com>
- Nils Coenen <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion website_require_login/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Website Login Required",
"category": "Website",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"author": "Advitus MB, Ooops, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/website",
"license": "LGPL-3",
Expand Down
1 change: 1 addition & 0 deletions website_require_login/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Ooops404 \<<https://ooops404.com>\>
- Nils Coenen \<<[email protected]>\>
1 change: 1 addition & 0 deletions website_require_login/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Ooops404 &lt;<a class="reference external" href="https://ooops404.com">https://ooops404.com</a>&gt;</li>
<li>Nils Coenen &lt;<a class="reference external" href="mailto:nils.coenen&#64;nico-solutions.de">nils.coenen&#64;nico-solutions.de</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
17 changes: 9 additions & 8 deletions website_require_login/tests/test_ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@


class TestIrHttp(HttpCase):
def setUp(self):
super().setUp()
self.website = self.env["website"].sudo().get_current_website()
self.auth_url = self.env["website.auth.url"].create(
{"website_id": self.website.id, "path": "/contactus"}
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.website = cls.env["website"].sudo().get_current_website()
cls.auth_url = cls.env["website.auth.url"].create(
{"website_id": cls.website.id, "path": "/contactus"}
)
self.user = self.env["res.users"].create(
cls.user = cls.env["res.users"].create(
{"name": "Test User", "login": "test_user", "password": "12345"}
)
self.path = "/contactus"
self.expected_path = "/web/login?redirect=%s" % self.path
cls.path = "/contactus"
cls.expected_path = "/web/login?redirect=%s" % cls.path

def test_dispatch_unauthorized(self):
# Test that a public user cannot access "/auth_path
Expand Down

0 comments on commit 5c37526

Please sign in to comment.