[feature/alwaysreply] Add a permission to separate sending PMs and replying to them#492
[feature/alwaysreply] Add a permission to separate sending PMs and replying to them#492imkingdavid wants to merge 9 commits intophpbb:developfrom
Conversation
|
By the way, I don't know why those other three commits are there... I'm certain that I forked/branched the most recent develop revision. :/ Let me know if I need to change something. |
|
There should be a check whether the original pm was really send and it should than be only possible to reply to the sender, not any other additional users |
|
I see what you mean... I just changed senders within the reply and it still allowed it to send. I'll add a way for it to confirm that the reply is to only the original sender. |
|
Actually, there's a bug in that I just noticed, but I have no time to fix it atm. Will do later. |
|
Alright, this has been tested locally and works for me. Please feel free to test it and let me know if something needs to be changed or done differently. |
|
You need to reset your develop branch to upstream develop and then rebase this branch on the resulting develop. git checkout develop |
There was a problem hiding this comment.
Note that if we're talking about always letting users reply, should we remove the permission for the first one (U_POST_REPLY_PM) and only require the permission to U_POST_REPLY_ALL? And in that case, we'd need some added logic to make sure that if they don't have to permission, they're actually replying to the original sender.
And on a non-related note, why is it POST_REPLY instead of SEND_REPLY or PM_REPLY?
|
We should also ensure, that there is still a way to "silence" people. |
|
Well as the patch currently is, if they have no u_sendpm and no u_pm_reply, they cannot send messages, so they are effectively "silenced". |
|
Okay, so current progress is: Do we want to make sure that if only u_pm_reply is enabled (no u_sendpm), the user is only replying to the original sender? I think for the most part this is done, other than that. Am I missing stuff? Of course it still needs to be tested. |
phpBB/develop/add_permissions.php
Outdated
There was a problem hiding this comment.
This should be reverted, ideally the commit where this is changed should be fixed.
phpBB/develop/add_permissions.php
Outdated
There was a problem hiding this comment.
(19:22:58) nx-: that file had an a9 which is i'm assuming iso-8859-1 but not utf-8
(19:24:25) nx-: c2 a9 is valid utf-8
(19:24:31) nx-: github must be misrendering it
(19:24:56) nx-: it renders the new version correctly
(19:25:16) nx-: obviously it is impossible to render 8859-1 and utf8 mix correctly
(19:25:49) nx-: i would suggest going through all existing files grepping for a9 not preceded by c2
(19:25:51) nx-: and fixing them
|
I believe that this is done, but I haven't looked at it in a while. If someone doesn't mind reviewing it I think it's ready for a merge. |
|
I am not seeing any database updater changes. The rest looks ok. |
|
@p Database updater changes have been added. |
|
This should wait for #985 as that PR introduces a new function for adding permissions that this PR can then use. |
|
Merged #985. |
PHPBB3-10517
…ries PHPBB3-10517
PHPBB3-10517
PHPBB3-10517
|
@p i've implemented the _add_permission() function in this PR, so it should be ready for a merge. |
|
Does not appear to actually work.
Investigate S_NO_AUTH_SEND_MESSAGE. |
|
Also please use italicized styling like acl_a_user does. |
There was a problem hiding this comment.
I would suggest:
Can send private messages (implies send and reply)
Can reply to private messages
Yes please. |
There was a problem hiding this comment.
Should at least apply De Morgan here and make it else if (!$auth->acl_get('u_pm_reply') && !$auth->acl_get('u_sendpm'))
|
No test coverage based on my comment about this feature not working? |
|
@imkingdavid bump |
|
I'll close this for now. Someone else is welcome to take over if they want before I come back to it. |
Related Links:
Request topic
Ticket
Adds a new permission (u_pm_reply) that can allow users to reply to Private Messages without being able to compose new PMs. The permission is ignored when u_sendpm is set to Yes, and is taken into account when u_sendpm is Never. In other words, a user will always be able to reply unless both u_sendpm AND u_pm_reply are Never.