Skip to content

Commit

Permalink
[FIX] website_require_login: Allow RPC
Browse files Browse the repository at this point in the history
JSON/XML RPC should not be redirected to login.
  • Loading branch information
SirAionTech committed Aug 6, 2024
1 parent 7264b78 commit 958f802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions website_require_login/models/ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def _require_login_whitelist_paths(cls):
# are needed to correctly render the login page
"/web",
"/website/translations",
"/jsonrpc",
"/xmlrpc",
]

@classmethod
Expand Down
3 changes: 3 additions & 0 deletions website_require_login/tests/test_ir_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def test_authorize_everything(self):
"/contactus": "/web/login?redirect=/contactus",
asset_attachment.url: asset_attachment.url,
"/web/login": "/web/login",
"/jsonrpc": "/jsonrpc",
"/xmlrpc/2/common": "/xmlrpc/2/common",
"/xmlrpc/2/object": "/xmlrpc/2/object",
}

# Assert
Expand Down

0 comments on commit 958f802

Please sign in to comment.