Announcement

Collapse
No announcement yet.

Permissions and views

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

  • Permissions and views

    I have a few questions about permissions and what an user is able to see:

    1) Is possible to disable or hide a sidepanel box? I need to have an admin only side panel (which I already developed)

    2) Is possible to disable/hide the "team" and "assigned user" select from the sidepanel? I don't want to show all my teams and my users to anyone.

    And I assume this is a bug:

    When I disable, for example, Cases or Accounts, and then goes to Tasks, I'm able to select "Cases" from the parent selection, but of course I receive a 403 when the popup comes out.

    Thanks!! I'm really impressed with espocrm, It almost fit all my requirements.

  • #2
    Hi

    1 - 2 not supported. Needs customization.

    Thanks for bug reporting


    Comment


    • #3
      Hi Yuri, can you point me to the right direction?

      1) I tried to create in /client/custom/src/views/record/detail-side.js but doesn't work, the same with edit-site.js or even in /panels/side.js

      I can modify the core files but I'm trying not to.

      Thanks

      Comment


      • #4
        Hi

        For a particular entity.

        You need to define custom JS class for your detail and edit view:
        custom/Espo/Custom/Resources/metadata/clientDefs/{EntityName}.json
        PHP Code:
        {
           
        "recordViews": {
               
        "detail""Custom:{EntityName}.Record.Detail",
               
        "edit""Custom:{EntityName}.Record.Edit",
               
        "quickEdit""Custom:{EntityName}.Record.Edit"
           
        }

        Create your js classes:
        client/custom/src/views/{entity-name}/record/detail
        PHP Code:
        Espo.define('Custom:Views.{EntityName}.Record.Detail''Views.Record.Detail', function (Dep) {
            
            return 
        Dep.extend({
                
                  
        sideView'Custom:{EntityName}.Record.Detail-Side'
          
          
        });
        }); 
        Create edit view class the same way.

        Create side view class
        client/custom/src/views/{entity-name}/record/detail-side/
        PHP Code:
        Espo.define('Custom:Views.{EntityName}.Record.Detail-Side''Views.Record.Detail-Side', function (Dep) {
            
            return 
        Dep.extend({
                
                  
        HERE YOUR CUSTOMIZATIONS FOR SIDE VIEW
          
          
        });
        }); 
        The same for edit-side if you need.

        Since client-side JS has no ability to check whether file exists we need to define custom classed in metadata.

        p.s. turn off cache or clear it after every change.
        p.p.s i didn't tested code so there can be mistakes.
        Last edited by yuri; 08-30-2014, 01:19 PM.

        Comment


        • #5
          Understand, thank you for the help, I'll need to redeclare one by one to modify Tasks or Cases.

          Comment

          Working...
          X