Permissions to post articles (permissions by thread type)

I assume you mean in the context of a general discussion forum that allows articles.

I'm not sure we're especially fond of the idea of having type-specific permissions but the obvious workaround for now is to have a dedicated articles forum and use node permissions to control who can/can't post threads in it.
 
I assume you mean in the context of a general discussion forum that allows articles.

I'm not sure we're especially fond of the idea of having type-specific permissions but the obvious workaround for now is to have a dedicated articles forum and use node permissions to control who can/can't post threads in it.
Yes I was thinking more in terms of article threads in general forums. But I can see how most people may want to restrict articles to specific article forums so not a big issue.
 
I have a forum for questions, suggestions and everything else related to the my site/forum. It also have all the articles about new things, like updates.
For me it would be nice to be the only one to be able to post articles, right now I am the only one who have permission to use the article-prefix.
I can't see me moving the articles out to a separate forum, and then I can't use the article type at all.

I guess one could sometimes also want a permission for suggestions threads, to only let admin and moderators use that in a general discussion forum.
 
Love the new "Question" and "Articles" thread types.

But I want "Articles" to only be able to be created by a certain usergroup... not something I want just anyone to be able to create.

Please consider adding thread type creationg to usergroup permissions and user permissions pages.
 
You have to create a permission definition in admincp, for example "Can write arcticles in discussion forums" - yourPermissionID. After that you need a class extension - XF\Entity\Forum to check that permission.


PHP:
<?php
namespace Your\AddonDIR\XF\Entity;


class Forum extends XFCP_Forum
{
    public function getCreatableThreadTypes(){
        $parent = parent::getCreatableThreadTypes();
        if(\XF::visitor()->hasNodePermission($this->node_id, 'yourPermissionID')){
            return $parent;
        }
        else {
            if($key = array_search('article' ,$parent) !== false){
                unset($parent[$key]);
            }
            return $parent;
        }
    }
}


this solution works for general discussion forums


greetings
idhae
 
Last edited:
I voted for both, but this one have more votes. (Do they ever merge suggestions? And would that lead to the right amount of votes?)
 
This is already possible by assigning thread/forums as "Read Only" and assigning privileges to those users groups or users you want to have privilege to post.
 
This is already possible by assigning thread/forums as "Read Only" and assigning privileges to those users groups or users you want to have privilege to post.
Would that work if you want all users to be able to post discussions threads in a forum, but only moderators be able to post articles threads?

If yes, how would you set that up?
 
(A duplicate suggestion has been merged into this thread as it had a high number of votes. Votes have all been aggregated into this thread.)
 
Would that work if you want all users to be able to post discussions threads in a forum, but only moderators be able to post articles threads?

If yes, how would you set that up?
Have thread/forum set up as "Reply Only" Give moderators permission to post articles and all others permission to reply. XF has been doing this for years with the "Have you seen....?" forum. Moderators (or specific people) post threads (no one else can post threads) and members reply. It's all permission based.
 
Last edited:
I believe what he is asking is for any member to be able to create standard threads in a specific forum, but only moderators can create article threads in that forum.

That would require custom development.
 
(A duplicate suggestion has been merged into this thread as it had a high number of votes. Votes have all been aggregated into this thread.)
And now just wait for all the reports about merging old closed suggestions with new ones with similar suggestions. ;)
 
I believe what he is asking is for any member to be able to create standard threads in a specific forum, but only moderators can create article threads in that forum.

That would require custom development.
Correct, that was my example for this suggestion thread.

The more general and best suggestion of the merged threads, I think, is:
Please consider adding thread type creationg to usergroup permissions and user permissions pages.
 
I believe what he is asking is for any member to be able to create standard threads in a specific forum, but only moderators can create article threads in that forum.

That would require custom development.
yes and here is the custom development:
 
In a mixed-content forum node, I would like to have dedicated article writers. This would be a user group setting. This is not possible in mixed-content forums since the thread permission controls all types (Discussion, Poll, Article, Question). As of now anyone can post an article when enabled. I would have to set up a dedicated article forum and permit the group, but that is not my desire. I would like them to have the Article tab in mixed-content forums. Thanks!
 
Last edited:
Top Bottom