Users can't create new topics on the Discussions page

cancel
Showing results for 
Search instead for 
Did you mean: 
afielden
Active Member II

Users can't create new topics on the Discussions page

I've programmatically created a site, but when logging in as a non-admin user, the discussion tab doesn't allow me to create a new topic, as shown in the attached snapshot, the button is disabled.

I presume this is a permission/role problem. Site node has the following permissions

ReadPermissions
GROUP_EVERYONE
ALLOWED
SiteCollaborator
GROUP_site_scQnTQcSXo_SiteCollaborator
ALLOWED
SiteConsumer
GROUP_site_scQnTQcSXo_SiteConsumer
ALLOWED
SiteManager
GROUP_site_scQnTQcSXo_SiteManager
ALLOWED
SiteContributor
GROUP_site_scQnTQcSXo_SiteContributor
ALLOWED

admin user has no problem in creating a new topic. Surely at least the site owner should be able to create a new topic?

Any suggestions please? This is Alfresco 5.2.

6 Replies
abhinavmishra14
Advanced

Re: Users can't create new topics on the Discussions page

As the permission levels states, if you are trying to create the topic in a site then the logged in user must have write access. i.e. use must be at least contributor. You have not mentioned the permission of the user which you are using to login. Please check the table below

Refer for more details:

https://docs.alfresco.com/5.2/references/permissions_share_components.html

https://docs.alfresco.com/5.2/references/permissions_share_other.html

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
afielden
Active Member II

Re: Users can't create new topics on the Discussions page

Thanks for the info. That does seem crystal clear doesn't it?

There's still something weird going on though, because I just changed the user's permission to 'Collaborator', and still can't create a new topic.

abhinavmishra14
Advanced

Re: Users can't create new topics on the Discussions page

Hmm, Do you see any logs or errors while creating the topics by Collaborator user ? Can you check share.log, alfresco.log and catalina.out log

Another test to do, create another user. Add the user to the site as a manager and try to create the topic. Just to double check the permission issues. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
afielden
Active Member II

Re: Users can't create new topics on the Discussions page

Well this is interesting, because I just created a new user, and added the user to the site. Result - user can't create a new topic, even though I added them as a contributor.

Only user who can create a new topic at the moment is admin.

afielden
Active Member II

Re: Users can't create new topics on the Discussions page

This is from 

share/src/main/resources/alfresco/site-webscripts/org/alfresco/components/discussions/toolbar.get.js

var toolbar = {
    id : "DiscussionsToolbar",
    name : "Alfresco.DiscussionsToolbar",
    options : {
        siteId : (page.url.templateArgs.site != null) ? page.url.templateArgs.site : "",
        containerId : (page.url.args.containerId != null) ? page.url.args.containerId : "discussions",
        allowCreate : model.forum.forumPermissions.create
    }
};
model.widgets = [toolbar];

So the 'allowCreate' property appears to be false.

Question is, what is setting model.forum.forumPermissions.create to false?

afielden
Active Member II

Re: Users can't create new topics on the Discussions page

Ok for the benefit of anyone else reading this, we got to the bottom of it.

We're programmatically creating a new site, using a site preset, which includes the 'discussion' page on the site dashboard toolbar.

As described above, nobody except Admin user could create a new topic after the site was initially created. The reason for this was the 'discussion' node doesn't exist, until someone creates a topic. Thereafter, anyone with Collaborator or Contributor role can create a new topic. 

Basically we added some code to the site creation webscript service, which specifically creates the discussions node, under the newly created site node. The folder has to be called "discussions", and you can use the defined static constant as the name of the node -

DiscussionServiceImpl.DISCUSSION_COMPONENT