SID-00292: Assign access control at topic creation time
| Status: |
Answered |
TWiki version: |
4.3.1 |
Perl version: |
|
| Category: |
CategoryAccessControl |
Server OS: |
|
Last update: |
16 years ago |
I have created an input form on a public web that creates a topic on a private web. I want to give the user who creates the topic access privileges (ALLOWTOPICVIEW, ALLOWTOPICCHANGE) to their own topics even though they will not have access to view the rest of that web. I can't quite figure out how to automate this although I expect it is one of the hidden fields in the form that will do this. Thanks.
--
XochipalaValdez - 2009-04-30
Discussion and Answer
You can impose an access restriction in the template topic as described in
TWikiAccessControl, for example with a setting:
-
Set ALLOWTOPICVIEW = %WIKIUSERNAME%
Need to to watch out for variables that are expanded at topic instantiation time, documented at
TWikiTemplates. Some variables such as
%WIKIUSERNAME% are expanded, other snot. If needed you have control over variable expansion.
FYI, no need to InventCrypticPageNames for support questions, free form text is just fine.
--
PeterThoeny - 2009-05-01
Thank you. I did get this to work as it does expand correctly in the topic. However, the user who does not have permissions to view the web, still is not allowed to view their own topic. The message says:
Access check on Ile/Dreamers.WebPreferences failed. Action "VIEW": access not allowed on web.
Do not the Topic preferences override the Web preferences?
--
XochipalaValdez - 2009-05-01
It complains about Ile/Dreamers.WebPreferences. What are you referencing in the view access controlled topic? Possibly add an ALLOWTOPICVIEW to Ile/Dreamers.WebPreferences to a group that includes all users who have view access controlled topics. Same for WebLeftBar and any other topic referenced by the view access restricted topics.
--
PeterThoeny - 2009-05-01
The only thing I am accessing is a form that is on the public users web. I have added access to the
WebLeftBar and
WebPreferences, and now am getting the message:
Access check on Ile/Dreamers.Dream-00008 failed. Action "VIEW": access not allowed on web
This is a subweb, and I don't know if that has anything to do with it.
--
XochipalaValdez - 2009-05-04
I did get this figured out. In the template I had
<!-- * Set ALLOWTOPICVIEW = %WIKIUSER% -->
I needed to put
* Set ALLOWTOPICVIEW = %WIKIUSER%
on a separate line. It worked fine after that. Thanks.
--
XochipalaValdez - 2009-05-04
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.