1. 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.

Resolved Certain permissions for content managers

Discussion in 'AMS Support' started by urivil, Jan 12, 2023.

  1. urivil

    urivil New Member AMS

    Hi,
    I wanted to ask where I find the following permissions, to prevent them from supervisors. Currently every supervisor who has edit and delete permission, also has the following permissions and I would like them not to have them.
    1. Reassignment of the article
    2. Change article dates
    3. Setting an article as recommended
     
  2. Bob

    Bob Developer Staff Member

    There is no individual permission for that. It is covered by the "Edit any article" permission (just like Core XFRM).

    PHP:
        public function canReassign(&$error null)
        {
            
    $visitor = \XF::visitor();

            return (
                
    $visitor->user_id
                
    && $this->hasPermission('editAny')
            );
        }

    Again, there is no individual permission for that. If the viewing user has the permission to edit ANY article, then they can change dates. If the viewing user is a Contributor (Author, Co-Author or Contributor), and they can edit the article (checks the canEdit permission check), then they can also change article dates.

    PHP:
        public function canChangeDates(&$error null)
        {
            
    $visitor = \XF::visitor();
           
            if (
    in_array($this->article_state, ['draft','awaiting']))
            {
                return 
    false;
            }
           
            if (
    $this->hasPermission('editAny'))
            {
                return 
    true;
            }
           
            return (
                
    $visitor->user_id
                
    && $this->isContributor()
                && 
    $this->canEdit($error)  
            );
        }

    There is no feature in AMS called "recommended". Might you be referring to FEATURED? If so, there is an AMS Article Moderator permission titled "Feature / unfeature articles". The viewing user needs to have that AND the article must be invisible state (not in draft, awaiting, moderated or soft deleted)

    PHP:
        public function canFeatureUnfeature(&$error null)
        {
            
    $visitor = \XF::visitor();
           
            return (
                
    $visitor->user_id
                
    && $this->isVisible()
                && 
    $this->hasPermission('featureUnfeature')
            );
        }
     
    urivil likes this.
  3. urivil

    urivil New Member AMS

    This is interesting, because in XF's general forum permissions editing permission for a moderator does not include permission to reassign a post or change date and time.
    1. I did not see that a change of owner or time was recorded in the history of the edited message. Is this an error on my part? I at least need to know which moderator reassigned and why.
    2. If in any case I want moderators to have the possibility to edit posts and comments on articles, but without the possibility to change owner or time, is this possible.
    Thank you
     
  4. Bob

    Bob Developer Staff Member

    Neither Threads, nor Posts have a reassign feature (nor a change dates feature), however, if they did, the XenForo Developers would develop those reassign features the same exact way as they developed the reassign resources for the XenForo Resource Manager (which is the standard that I follow for reassign functions in my add-ons). It would be a very easy customization for even a novice developer to write an addon for you that adds a new permission and extends the canReassign() permissions check to take that new permission into account. Contact Ozzy47, they are quick and cheap and know my addons.

    No, nothing you've done wrong. The Core XenForo Edit History Handler is only for the MESSAGE field, not anything else. There are several suggestions posted at XenForo.com to enhance the Edit History Handler.

    When a piece of content (Article, Comment, Review) is reassigned, that is logged in the Moderator Logs (which can be viewed on the article itself or in the Moderator Logs in the Admin CP). The moderator can include a reason, however, that is only for the Alert that is sent to the Current Owner and the New Owner (again, 100% as XenForo developed it for the XenForo Resource Manager).

    The editing of POSTS is a Core XenForo function, controlled by Core XenForo. Core XenForo does not have a reassign function, nor a change dates function for any of its content types (Threads, Posts, Conversations, Profile Posts, Profile Post Comments etc. The only reassign feature they've developed is for the XenForo Resource Manager.

    As for AMS, if the viewing user can edit any Article or edit any Comment or edit any Review, they have permission to reassign as well as change dates. If the viewing user is a Contributor (author, co-author, contributor) for the Article and they have permission to edit the article, they can change dates.

    It will require customization to do what you want to do. I am sure Ozzy47 can do it quick and at a very reasonable cost :)
     
  5. urivil

    urivil New Member AMS

    Thanks for the detailed answers.
    I'm not sure I understood what you wrote here. But only when I reassign the article does the action show up in the moderator log. In contrast, when I reassign a comment on an article, this action does not appear in the moderator log [nor in the article's moderator actions].
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.