Compare commits
5 Commits
master
...
Fixed-Old-
Author | SHA1 | Date |
---|---|---|
Simon DELAGE | 84ead8cff6 | |
Simon DELAGE | b84b0e5893 | |
Simon DELAGE | febe34601f | |
Simon DELAGE | e360655687 | |
Simon DELAGE | 3ba4f69548 |
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -19,4 +19,3 @@ $lang['templatepath'] = 'Относительный путь до файла ш
|
|||
$lang['users_namespace'] = 'Неймспейс где будут создаваться неймспейсы пользователей.';
|
||||
$lang['group_by_name'] = 'Группировать неймспейсы пользователей по первой букве имени?';
|
||||
$lang['edit_before_create'] = 'Редактировать домашнюю страницу, но не создавать её.';
|
||||
|
||||
|
|
Loading…
Reference in New Issue