What's the favoured way of allowing anonymous users access to a private Plone folder?

StackOverflow https://stackoverflow.com/questions/21240311

  •  30-09-2022
  •  | 
  •  

سؤال

I want to allow anonymous users view access to a private folder & it's contents, only after they have submitted a valid email address through a form. I thought of emailing them a link to the folder, perhaps with a token that gives them access or logs them in, but I'm not quite sure how to do that.

I'm currently looking at collective.powertoken.core & collective.powertoken.view, but it seems that these products cover access to a single content item, rather than a whole folder.

I'm wondering if it's better just to add low priviledged users to the system & log them in without passwords.

Thanks

هل كانت مفيدة؟

المحلول

as suggested by @keul, you can use redomino.tokenrole.

If you want to integrate the tokenrole feature with a PloneFormGen you might consider to have a look at redomino.tokenroleform (https://pypi.python.org/pypi/redomino.tokenroleform):
It is a custom plone form gen adapter that let you share a private object via token.

I don't know if redomino.tokenroleform fits your use case.

But you can browse the code in order to understand how to add a tokenrole programmatically.

نصائح أخرى

Both products are for very low level usage.

Try redomino.tokenrole: https://pypi.python.org/pypi/redomino.tokenrole

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top