It looks like you're new here. If you want to get involved, click one of these buttons!
Amazing! Sign our contributors' agreement and then join us on GitHub.
How to let users close their own discussions? Thanks for the help in advance.
It would require a plugin. Nothing too complicated, though I wouldn't call it the best task for a total beginner.
The plugin basically would have to duplicate DiscussionControllers close() method, with a few exceptions concerning the permission checks:
a) Check if session user = discussion author. Exit if not.
b) Check if session user has Vanilla.Discussions.Close permissions and exit if yes (user is already allowed to close discussions)
c) Skip the later check for Vanilla.Discussions.Close and maybe replace it with a custom permission
Additionally, the "Close" option must be added for discussion authors.
@R_J , can you please assist me with some code for this?
Start, show me what you did and I will give feedback.
@R_J , can you tell me what functions to use?
Do NOT mention RJ again (or me, or anyone else), unless you have done what you were asked, and made a start on this plugin, so you can explain where you have got to and where you are stuck.
Don't you see this yourself, little guy? You are proving once again that you are not willing to do anything on your own. What motivation should drive me to help you? I'm a supporter, not a servant.
Go and start! What to do can be taken from the docs and from my answer to your initial question. Unless you don't show any initiative on your own here, I will simply close this discussion because it would become pointless.