• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

As Designed Submit articles without approval is bypassed with moderator perm

jtferdinand

New Member
AMS Premium
When
Submit articles without approval is set to NO or NEVER

This is bypassed if the AMS moderator permission approve/unapproved articles is set to yes.

This means the moderator can submit their own article without it entering the approval process. I understand they could just approve it from the approval list but that is not the point as it should still go there in the first instance.
 
This is exactly the same way Threads, Posts, Profile Post, Resources, Resource Updates, Resource Ratings, Media, Media Comments, Albums etc work.

If the piece of content is being added by a Moderator that has permission to Approve the piece of content, then the piece of content is added in a Visible state. This is a XF Standard that I follow for all content types in all of my addons, just like XenForo follows for all of its content types as well as its 1st party addons content types.

Example... This is the function for getting the New Article state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the article state is set to Visible.
PHP:
    public function getNewArticleState(ArticleItem $article = null)
    {
        $visitor = \XF::visitor();

        if ($visitor->user_id && $this->hasPermission('approveUnapprove'))
        {
            return 'visible';
        }

        if (!$this->hasPermission('submitWithoutApproval')) 
        {
            return 'moderated';
        }
        
        return 'visible';
    }

Example This is the function for getting the New Thread state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the thread state is set to Visible.
PHP:
    public function getNewContentState(Thread $thread = null)
    {
        $visitor = \XF::visitor();

        if ($visitor->user_id && $visitor->hasNodePermission($this->node_id, 'approveUnapprove'))
        {
            return 'visible';
        }

        if (!$visitor->hasPermission('general', 'submitWithoutApproval'))
        {
            return 'moderated';
        }

        if ($thread)
        {
            return $this->moderate_replies ? 'moderated' : 'visible';
        }
        else
        {
            return $this->moderate_threads ? 'moderated' : 'visible';
        }
    }


Example... This is the function for getting the New Resource state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the resource state is set to Visible.
PHP:
    public function getNewContentState(ResourceItem $resource = null)
    {
        $visitor = \XF::visitor();

        if ($visitor->user_id && $this->hasPermission('approveUnapprove'))
        {
            return 'visible';
        }

        if (!$visitor->hasPermission('general', 'submitWithoutApproval'))
        {
            return 'moderated';
        }

        if ($resource)
        {
            return $this->always_moderate_update ? 'moderated' : 'visible';
        }
        else
        {
            return $this->always_moderate_create ? 'moderated' : 'visible';
        }
    }

Example... This is the function for getting the New MMedia state. The first check is seeing if the viewing user has the Moderator permission 'approveUnapprove' and if they do, the media state is set to Visible.
PHP:
    public function getNewContentState()
    {
        $visitor = \XF::visitor();

        if ($visitor->user_id && $this->hasPermission('approveUnapprove'))
        {
            return 'visible';
        }

        if (!$this->hasPermission('addWithoutApproval'))
        {
            return 'moderated';
        }

        return 'visible';
    }

I understand they could just approve it from the approval list but that is not the point as it should still go there in the first instance.
I have no plans to deviate from XF standards. You'll have to get them to change their standards and if they do, I will gladly change mine.
 
Fair enough, I don’t put the same emphasis on the other XF features. I will ask on their forums why it’s designed this way.
 
  • Like
Reactions: Bob
Back
Top