Show Knowledgebase Articles conditional

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • shalmaxb
    commented on 's reply
    Thank you, posted the solution that same moment.

  • dimyy
    replied
    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 $user, Entity $entity, $data)
    {
    if ($this->isProtectedCategory($user, $entity, $data)) {
    return false;
    }
    
    return parent::checkEntityRead($user, $entity, $data);
    }
    
    public function isProtectedCategory(User $user, Entity $entity, $data)
    {
    }
    
    }
    Attached Files

    Leave a comment:


  • shalmaxb
    replied
    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.

    Leave a comment:


  • DEN
    replied
    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

    Leave a comment:


  • shalmaxb
    replied
    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?

    Leave a comment:


  • DEN
    replied
    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.

    Leave a comment:


  • shalmaxb
    replied
    Where in the Layout Manager I can configure the category tree view?

    Leave a comment:


  • DEN
    replied
    Check the layout manager.

    Leave a comment:


  • shalmaxb
    replied

    Leave a comment:


  • DEN
    replied
    Pls show me screenshots how it should look.

    Leave a comment:


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

    Leave a comment:


  • DEN
    replied
    Hi,
    Yes of course,
    Do disabled Knowledgebase Categories in Roles.

    Leave a comment:


  • shalmaxb
    started a topic Show Knowledgebase Articles conditional

    Show Knowledgebase Articles conditional

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