Compare commits

...

5 Commits

Author SHA1 Message Date
Simon DELAGE 84ead8cff6 Update README.md 2014-09-13 09:24:53 +02:00
Simon DELAGE b84b0e5893 Update action.php
Forgot the ACL improvement wich is necessary to protect private namespaces
2014-09-07 07:30:45 +02:00
Simon DELAGE febe34601f Update README.md 2014-09-07 07:27:26 +02:00
Simon DELAGE e360655687 Removed patern from [templatepath] option
Was preventing to change the path
2014-09-01 15:37:49 +02:00
Simon DELAGE 3ba4f69548 Removed an empty line 2014-08-30 17:19:14 +02:00
4 changed files with 9 additions and 4 deletions

View File

@ -5,4 +5,6 @@ Dokuwiki plugin to automatically create user's homepage and/or namespace.
Previous authors stopped developing it in 2009.
I started to work on it in 2014-08.
Simon Delage, simon.geekitude@gmail.com
This is the old version with only a few fixes to enable saving options and make ACL work.
Simon Delage

View File

@ -120,7 +120,11 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin
if ( $this->getConf('set_permissions') == 1 )
{
$acl = new admin_plugin_acl();
$ns = cleanID($this->home_wiki_ns.':'.$this->homePage());
// Lines changed following suggestion from Luitzen van Gorkum
// Old user-page ACL:
// $ns = cleanID($this->home_wiki_ns.':'.$this->homePage());
// New user-namespace ACL:
$ns = cleanID($this->home_wiki_ns).':*';
$acl->_acl_add($ns, '@ALL', (int)$this->getConf('set_permissions_others'));
$acl->_acl_add($ns, strtolower($_SERVER['REMOTE_USER']), AUTH_DELETE);
}

View File

@ -8,7 +8,7 @@ $meta['use_name_string'] = array('onoff'); // use name string instead of lo
$meta['use_start_page'] = array('onoff'); // use start page instead of namespace string for home page
$meta['set_permissions'] = array('onoff'); // configure permissions
$meta['set_permissions_others'] = array('multichoice','_choices'=>array('0','1','2','4','8','16')); // if enable set permission, what permission for other people?
$meta['templatepath'] = array('string','_pattern' => '/^(|[a-zA-Z\-]+)$/'); // the location of the template file
$meta['templatepath'] = array('string'); // the location of the template file
$meta['users_namespace'] = array('string','_pattern' => '/^(|[a-zA-Z\-:]+)$/'); // the namespace containing user directories
$meta['group_by_name'] = array('onoff'); // group people by the first character of name
$meta['edit_before_create'] = array('onoff'); // allow users to edit their home page before create.

View File

@ -19,4 +19,3 @@ $lang['templatepath'] = 'Относительный путь до файла ш
$lang['users_namespace'] = 'Неймспейс где будут создаваться неймспейсы пользователей.';
$lang['group_by_name'] = 'Группировать неймспейсы пользователей по первой букве имени?';
$lang['edit_before_create'] = 'Редактировать домашнюю страницу, но не создавать её.';