SID-00798: Set WebPreferences not via Interface (maybe using plugin API)
| Status: |
Answered |
TWiki version: |
4.3.2 |
Perl version: |
|
| Category: |
CategoryAPI |
Server OS: |
Centos |
Last update: |
15 years ago |
Hi,
How can I create a Web and Set Preferences (mainly only Access Control preferences such as ALLOWWEBCHANGE) not using the interface in TWiki. I'm thinking of create a plugin to set the preference for the web, but I can't find any API in the TWiki::Func supporting that feature.
I can use the createWeb( $newWeb, $baseWeb, $opts ) to create a Web using plugin, but I don't know how to set preference for it.
Are there any API supporting it ?
Thanks a lot in advance,
Ann
--
AnhTran - 2010-03-29
Discussion and Answer
There is no API per se, but you can programmatically read/modify/save the WebPreferences topic in the newly created web. Simply do a regex search for the "* Set ALLOWWEBCHANGE =" line and add the group to it.
--
PeterThoeny - 2010-03-29
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2010-05-02
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.