[CDB] Customize first post edit permissions

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
Locked
User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

[CDB] Customize first post edit permissions

Post by gn#36 » Sun May 31, 2015 1:30 am

Name der Extension: gn36 - customize first post edit permissions
Autor:gn#36

Description: Allows to differenciate between the first post in a topic and replies for edit rights. Also adds an permission to allow users to bypass the maximum edit time on a per-forum basis (also separate first post / replies). Thus, the topic poster could be permitted to change the first post while he is not permitted to change replies. Or he could be permitted to change the first post of the topic indefinitely while he can only edit his replies for two days or so.

Current version of the extension: 1.2.1 [final]

Prerequisites:
  • phpBB 3.1.3-RC1 or newer
Features:
  • Splits the edit permission for the first post in a topic into a separate permission. The regular edit permission is renamed and applies only to replies.
    • The permission "can edit own posts" is renamed to "can edit own replies"
    • A new permission "can edit first post of own topics" is added, which controls the permission to change the first post of a topic.
    • Both permissions are required to retain the old behavior.
  • Permits to bypass the maximum edit time. This is configurable separately for the first post of a topic and replies.
    • A new permission "Can bypass max edit time in first post of own topics" is added.
    • A new permission "Can bypass max edit time for own replies" is added.
    • Both permissions bypass the maximum edit time that was configured in the board setting for their respective post types. This does not affect the edit permission settings - these permissions are without function if no edit rights are present.
  • All of these permissions are forum permissions. They only apply to a users own posts and do not permit editing of other users posts. They do not grant the users moderator permissions.
  • Configuration is done using regular forum based permissions.
  • Upon installation, all permissions are configured in such a way that no existing behavior is changed: No user is permitted to bypass the maximum edit time, all users with edit permissions are granted the permission to edit the first post accordingly.
Planned:
  • No new features
Screenshots:

Yellow: changed right - before: "can edit own posts"
Red: new rights

English version:
Image
German "de" version:
Image (many thanks to LukeWCS)

Download:
Customization DB: https://www.phpbb.com/customise/db/exte ... tpostedit/
Github:https://github.com/gn36/phpbb-ext-firstpostedit

Please report errors on github: https://github.com/gn36/phpbb-ext-firstpostedit/issues
Please also Send Pull Requests for translations to github.
Last edited by gn#36 on Mon Aug 10, 2015 9:10 pm, edited 5 times in total.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
LukeWCS
Registered User
Posts: 148
Joined: Mon Dec 08, 2014 12:32 pm
Location: Germany

Re: [RC] Customize first post edit permissions

Post by LukeWCS » Sun May 31, 2015 10:08 am

@gn#36

Added english screenshot version at WCSD forum for your first post here.

edit: screenshot deleted
Last edited by LukeWCS on Mon Jun 01, 2015 2:14 pm, edited 1 time in total.
May the backup be with you. Always.

My extensions: Monospace font for Posting Editor (phpbb.de)
My extension forks: LF who was here (phpbb.de / phpbb.com), ModBreak eXtended (phpbb.com)

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [RC] Customize first post edit permissions

Post by gn#36 » Mon Jun 01, 2015 1:03 pm

Thanks! I have added the image above.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] Customize first post edit permissions

Post by GoBieN » Tue Jun 09, 2015 8:56 pm

Excellent, I need this!
Override edit time for some users

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] Customize first post edit permissions

Post by GoBieN » Thu Jul 30, 2015 9:09 pm

I seem to have a problem with the extension.
I'm confident I have configured it correctly, but the user can't edit his own post past the time limit from the board.

I took screenshots:

Permission mask for the user I'm testing with and the forum where there is a topic/post that I'll test.
Image

I test the permissions for this user, using the phpBB supplied test user permissions method.
Image

When viewing the topic/post in the forum for which the mask was shown, while testing permissions from the user, I can't see an edit button on the post.
Image


Am I doing something wrong?

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [RC] Customize first post edit permissions

Post by gn#36 » Thu Jul 30, 2015 10:28 pm

I am afraid you are. The tool to test permissions only gives you another users permissions, not his user ID. If you post a new topic, it will be yours, not his. If he cannot edit your posts, you won't be allowed to edit his. So his posts are irrelevant - you have to check edit permissions on your own posts after taking over his permissions.

Nice details on the report though :D
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] Customize first post edit permissions

Post by GoBieN » Tue Aug 04, 2015 10:24 pm

Aha, that makes sense, did not know that.
If i check my own posts when using the user's permissions I can edit the post.
So I'll ask the user to check.

User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [RC] Customize first post edit permissions

Post by gn#36 » Wed Aug 05, 2015 2:12 pm

You should be able to check yourself - you only have to check with your posts instead of his. You should receive exactly the same permissions as he does except for your own posts.

So if you permit the user to edit the first post but deny editing replies, after you took over his permissions, the same should apply for your own posts. Obviously, the same holds true for all other permissions. So if you want to test the time limitation of editing, check with one of your older posts.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

User avatar
GoBieN
Registered User
Posts: 538
Joined: Fri Mar 05, 2004 5:22 pm
Location: Belgium
Contact:

Re: [RC] Customize first post edit permissions

Post by GoBieN » Thu Aug 06, 2015 7:40 pm

The user has confirmed it's working as expected. Thanks for taking the time and explaining to me how the test user permissions work :D


User avatar
gn#36
Translator
Posts: 185
Joined: Fri Oct 13, 2006 1:16 pm
Contact:

Re: [CDB] Customize first post edit permissions

Post by gn#36 » Tue Aug 11, 2015 12:29 pm

Thank you.

The travis check has failed due to coding convention errors, but that is not related to your pull request. It seems I have missed this error earlier.

I will include your translation in the next version.
German Support Team Member • http://www.phpbb.deMy Extensions in the CDBMy Extensions on Github • Contact with caos is inavoidable but no catastrophy if you keep an overview.

Locked

Return to “Extensions in Development”