Not logged in. · Lost password · Register

All posts by Dralli72 (7)

topic: Userhomepage (New version)  in the forum: General Help and Support Plugins
Avatar
Dralli72 #1
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Hi geekitude,

sorry to bother you again, I didn't saw the update here, but already updated the plugin from the extension manager. The double colon is now gone, but the plugin still keeps creating an "AUTH_EDIT" ACL even if the public part is a namespace. Should be AUTH_DELETE IMHO.

I'm not really used to github pull request (should practice that, though), but I've "hacked" your code in my local installation and I think it should work this way: In action.php, in function acl(...) from line 256, change this

if (strpos($this->getConf('public_pages_ns'),':%NAME%:%START%') !== false) {
    //$where = cleanID(str_replace(':%NAME%:%START%', '', $this->getConf('public_pages_ns'))).':*';
    $where = str_replace('%NAME%:%START%', '%USER%', $this->getConf('public_pages_ns')).':*';
} else {
    $where = cleanID($this->getConf('public_pages_ns')).':%USER%';
}
$who = '%USER%';
$perm = AUTH_EDIT;

to this

if (strpos($this->getConf('public_pages_ns'),':%NAME%:%START%') !== false) {
    //$where = cleanID(str_replace(':%NAME%:%START%', '', $this->getConf('public_pages_ns'))).':*';
    $where = str_replace('%NAME%:%START%', '%USER%', $this->getConf('public_pages_ns')).':*';
    $perm = AUTH_DELETE;
} else {
    $where = cleanID($this->getConf('public_pages_ns')).':%USER%';
    $perm = AUTH_EDIT;
}
$who = '%USER%';

This way, the generated ACL is AUTH_DELETE for a namespace and AUTH_EDIT for a single page. Well, at least in my installation the plugin immediately replace the "homepage:pub:$USER%:* %USER% 2" ACL with "homepage:pub:$USER%:* %USER% 16".

Thanks for using my translations, gonna check them soon, but now it's too late and I need to have some sleep...

Edit: checked the templates in lang/de-informal. No problems detected.  :-)
This post was edited on 2018-03-02, 17:16 by Dralli72.
topic: Userhomepage (New version)  in the forum: General Help and Support Plugins
Avatar
Dralli72 #2
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 59822
Wow, thank you! That was fast! :D

Ok, I've updated the plugin and it seems to be working. I had some minor issues, though:

1. The plugin insists on creating an ACL "homepage:pub::%USER%:* %USER% 2" (note the double : between "pub" and "%USER"). My setting for public_pages_ns is currently "homepage:pub:%NAME%:%START%".

2. Since the plugin now creates a public namespace, the former limitations ("You can't create any other page in that namespace ''//@TARGETPUBLICNS@//''" and "Only a superuser can add a picture") are not needed anymore if the ACL would be "homepage:pub:%USER%:* %USER% 16".

3. I'm using the language "de-informal" in my wiki (German language differentiates between formal salutation ("Sie") and informal salutation ("Du")). Hence the copying from the default templates didn't work because "de-informal" didn't exist. I attached my versions of both language folders "de" and "de-informal" to this post. In the public templates, I've removed the description of the above mentioned limitations!

But besides that, it looks very good! Thank you very much!
The author has attached one file to this post:
de_and_de-informal.zip 7.3 kBytes
You have no permission to open this file.
topic: Hide page revisions from read-only users?  in the forum: General Help and Support Features and Functionality
Avatar
Dralli72 #3
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 59803
Denyactions works, and it also helped me to roll back a "hack" I introduced in bootstrap3 template to hide the MediaManager from anonymous users.

Thank you!
topic: Userhomepage (New version)  in the forum: General Help and Support Plugins
Avatar
Dralli72 #4
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 53877
Hello, I'm just checking the userhomepage-Plugin to see if I can use it.

Is it correct that the plugin can create a private namespace, but only a public page?

For example, I want to create this layout for users:

homepage:username:*            <= everything below user's namespace is readable by anyone and writeable only by the user
homepage:username:private:*    <= everything below "private" subnamespace is readable and writable only by the user

Alternatively, I could think of this layout:

homepage:pub:username:*        <= each user's namespace below homepage:pub: is public readable and writable only by the user
homepage:priv:username:*       <= each user's namespace below homepage:priv: is readable and writable only by the user

The plugin should create in both namespaces the "start" page from a template. Is this possible?

Thank you and kind regards,
Thorsten
topic: Using %USER% wildcard in ACL  in the forum: General Help and Support Installation and Configuration
Avatar
Dralli72 #5
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Using %USER% wildcard in ACL
Hello,

according to https://www.dokuwiki.org/acl#user_wildcards, one can use a %USER% wildcard in acl.auth.php to shorten the ACL list. I have a few users currently registered in my DokuWiki, and I've set up a homepage structure for every user with a "public" homepage (readable by anyone, editable only by the user itself) and a "private" homepage (readable and editable only by the user itself). This is what the ACL looked like before using the wildcard:

homepage:*    @ALL    1
homepage:andrea:*    andrea    16
homepage:andrea:privat:*    @ALL    0
homepage:andrea:privat:*    andrea    16
homepage:holzseehunde:*    holzseehunde    16
homepage:holzseehunde:privat:*    @ALL    0
homepage:holzseehunde:privat:*    holzseehunde    16
homepage:m._heinrich:*    m%2e%5fheinrich    16
homepage:m._heinrich:privat:*    @ALL    0
homepage:m._heinrich:privat:*    m%2e%5fheinrich    16
homepage:meysche:*    meysche    16
homepage:meysche:privat:*    @ALL    0
homepage:meysche:privat:*    meysche    16
homepage:myjuergen:*    myjuergen    16
homepage:myjuergen:privat:*    @ALL    0
homepage:myjuergen:privat:*    myjuergen    16
homepage:tniederkrome:*    tniederkrome    16
homepage:tniederkrome:privat:*    @ALL    0
homepage:tniederkrome:privat:*    tniederkrome    16

and this is what the ACL looked like after using the %USER% wildcard:

homepage:*    @ALL    1
homepage:%USER%:*    %USER%    16
homepage:%USER%:privat:*    @ALL    0
homepage:%USER%:privat:*    %USER%    16

Unfortunately, this doesn't seem to work. When I check the ACL in the admin interface, all pages below the homepage:-Namespace are reported as "readable by everyone", and no one (except me, but I'm @admin) is allowed to write anywhere. It looks like only the acl "homepage:* @ALL 1" is taken into account.

Am I missing something?

I'm using DokuWiki Release 2017-02-19e "Frusterick Manners" with Bootstrap3-Template. All plug-ins and the template are up-to-date.

Thanks for every help.

Regards, Thorsten
topic: Hide page revisions from read-only users?  in the forum: General Help and Support Features and Functionality
Avatar
Dralli72 #6
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Hide page revisions from read-only users?
Hello,

I'm looking for a way to hide the page revisions from read-only users. In our wiki, anonymous users have only read access, and self-registered users have currently very limited write access until we add them to a "higher level" group.

I want to hide the page revisions for a user has only read access to this page from the user. I already managed to hide the recent changes from these user by editing inc/changelog.php (I know this won't survive an update) line 371 in function _handleRecent from

if ($recent['perms'] < AUTH_READ) return false;

to

if ($recent['perms'] < AUTH_EDIT) return false;

but I can't find a good line to hide the page revisions from read-only users. Any ideas how to achieve that?

Thanks for any hints and tips.

Regards,
Thorsten
topic: Hello from Sottrum, Lower Saxony, Germany  in the forum: Community User Introductions
Avatar
Dralli72 #7
Member since Feb 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Hello from Sottrum, Lower Saxony, Germany
Hello,

I'm living in a small village near Sottrum and we are currently working on a homepage for our village where we will try to collect as much current and historical events (like "1921: village was connected to electric supply, celebrated with an "electric party" on 21st of December") as possible and we think DokuWiki will help us working together on this project.

Looking forward for good times here in the forums :)

Regards,
Thorsten
Close Smaller – Larger + Reply to this post:
Special characters:
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-05-26, 17:58:59 (UTC +02:00)