1

A mate and I are doing an internship at university, and the project we are working on is a small Joomla 4.1 website. Our supervisors asked us to override the mechanics of content insertion so that an article submitted by an author needs to be approved by a moderator before being featured for every visitor - as a result, we created our own Content table and a Status table linked to it. Also note that given the small scope of the website, we are also assuming a 1-to-1 correspondence between sections and categories.

The problem is that the Joomla UI lets any authenticated user upload articles and set them visible to all visitors through a "new article" button in any section. Is there a way to remove these buttons or override them with something of our own?

Crossposted here and on Stack Overflow, where I've also been told about workflows. We've been looking into them, but I'd still like to have a different approach if we decide to go down that route nonetheless, for some reason.

4

1 Answer 1

2

With some minor configuration tweaks, and some better understanding of Joomla's Access Control Levels, you can easily achieve what you're trying to do. My Joomla Magazine article from June 2021 will help you understand perhaps more of the basic concepts.

Creating additional tables like you've done may not have been necessary.

Access Control Levels

As you've already discovered, by default Joomla has a number of built in user groups and access levels. These all take care of the basics.

The default Author settings are Create = Allowed; Edit = Not allowed (inherited) and Edit State = Not allowed (inherited). This means Authors at the user level can create a new article, but the ACL structure does not allow them to "publish" as they don't have Edit State permissions.

Joomla will send the next permission level up a private message to notify them that an article has been submitted. The user at that next level should then be in a position to publish the article if it's approved (ie act as the moderator).

Custom Access Control Groups

To extend on that, you can create additional child user groups that you can then specify particular permissions for, and you don't need an extra extension - it can be done directly in Joomla's core functionality.

So if you were to created a "Moderated Authors" group, you can then go to Content > Options > Permissions and change settings for various items to either Inherited (gets the parent group's permission), Allowed (explicitly gives that permission to this group) or Denied (explicitly prevents access to that feature for this group).

However in your particular example, the core user groups should do what you need them to.

I would also create a menu item to allow a user to "Create article" that has Special as the permission group. This will give you a URL that you can control the name of plus the access control on.

Workflow

Another Joomla Magazine article gives you an overview of Workflow.

Workflows are based on stages - what the piece of content is currently at the point of in the workflow, and transitions - what you can do to that content when it's at the particular stage.

With stages and transitions, you can make them available to particular permission groups.

If you were to create a custom user group, you would then be able to make particular workflows, stages and transitions only available to particular groups.

An example may be that the initial Stage the article being submitted can be at is Draft. The only transition available to that user type may be "Submit new article". After that, the higher up groups that moderators are in will have additional transitions available to further process the article.

3rd Party Extensions

There's a number of ACL extensions also available for Joomla, which are designed more for granular control of additional features. Check https://extensions.joomla.org to search for what's available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.