Announcement

Collapse
No announcement yet.

Show Knowledgebase Articles conditional

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Show Knowledgebase Articles conditional

    Hi, is there any way to hide Knowledgebase Categories or Articles from certain users/roles?

  • #2
    Hi,
    Yes of course,
    Do disabled Knowledgebase Categories in Roles.

    Comment


    • #3
      This way I can disable all categories at once, but I do only want to disable one certain category.

      Comment


      • #4
        Pls show me screenshots how it should look.

        Comment


        • #5

          Comment


          • #6
            Check the layout manager.

            Comment


            • #7
              Where in the Layout Manager I can configure the category tree view?

              Comment


              • #8
                Categories allow to group articles. One category can contain multiple sub-categories. Each article can be related to one or multiple categories.

                Knowledge Base Category is a separate entity type, hence an access can be controlled by ACL Roles.

                Comment


                • #9
                  Or I do not get something or this statement is not true for my case. I want to disable only one category, no problem if it would be possible with role permission. But the category entity is an entity for ALL categories, so I can disable all, but not one specific. Am I wrong?

                  Comment


                  • #10
                    The ability to remove one category exists, but I don’t think to hide.
                    You can hide an element on the "list view" but not the "records" or "categories".

                    And how do you like the option to deleted the category?
                    Manage category > Remove

                    Comment


                    • #11
                      Now I got it. The only way to hide or show either knowledgebase articles or categories is from Team.

                      Let´s say you have categories A, B and C

                      You want team 1 see only A and B, and team 2 only B and C

                      In every category you choose the team (in the side panel), which can see the category. In the example case it would be:
                      In category A you associate team 1
                      In category B you associate team 1 and team 2
                      In category C you associate team 2

                      For single articles it is the same procedure. Admin has always acces to all categories and articles.
                      Last edited by shalmaxb; 05-12-2021, 11:26 AM.

                      Comment


                      • #12
                        You can try:

                        0. Create 2 groups: "without wordpress integration" and "full access"
                        1. Assign "without wordpress integration" to all categories except "wordpress integration" category .
                        2. Edit "without wordpress integration" user role to grant "group" read access to knowledgebase category
                        3. Assign "without wordpress integration" groups to users without access to "wordpress integration" category.
                        4. Edit "full access" user role to grant "all" read access to knowledgebase category
                        5. Assign "full access" to all users except "without wordpress integration" users

                        Another way:
                        Make program customization like this:

                        PHP Code:
                        <?php

                        namespace Espo\Custom\Acl;

                        use 
                        Espo\ORM\Entity;

                        class 
                        KnowledgeBaseCategory extends \Espo\Core\Acl\Base
                        {

                        public function 
                        checkEntityRead(User $userEntity $entity$data)
                        {
                        if (
                        $this->isProtectedCategory($user$entity$data)) {
                        return 
                        false;
                        }

                        return 
                        parent::checkEntityRead($user$entity$data);
                        }

                        public function 
                        isProtectedCategory(User $userEntity $entity$data)
                        {
                        }

                        }
                        Attached Files

                        Comment


                        • shalmaxb
                          shalmaxb commented
                          Editing a comment
                          Thank you, posted the solution that same moment.
                      Working...
                      X