Commit 246deb0a authored by Arnaud Fontaine's avatar Arnaud Fontaine

RFC: preferred_bearer_token_key property default should be '' instead?.

parent 7fbe04de
if REQUEST is not None:
# mini security
return None
return context.getPortalObject().portal_preferences.getPreferredBearerTokenKey()
return (context.getPortalObject().portal_preferences.getPreferredBearerTokenKey() or '').encode('utf-8')
  • this generally looks a good idea, but I am not sure this business template / this property is still used, so I feel we can just do the easiest

  • Thanks for your reply. If that bt5 is not used anymore, why not move it to erp5-archive.git?

    BTW, is there any other bt5 which could be moved to that repository?

  • I was wrong, the business template is used, it's a dependency of google login integration (and I know some projects using google login in production). Google login does not use getPreferredBearerTokenKey, I don't know about this preference, it seems used indirectly by product/ERP5Security/ERP5BearerExtractionPlugin.py, it might be used in some custom code, I don't know.

    My idea with this comment was that we don't need to spend too much time improving this specific part. Changing the property default might be more beautiful and is also easy, so if you prefer this way I like it as well, up to you :)

    While working on python3 port I removed 2 business templates that were problematic on python3 ( https://lab.nexedi.com/nexedi/erp5-archive/-/commits/master ), as far as I know, there are no other bt5 that we can remove.

  • Thanks for investigating. You're right, let's not bother. I have just merged this change into the "big" commit.

    So you already did the work about removal of unused bt5, nice!

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