Menu

Customizing access via scope

Sean Guo
2025-08-29
2025-08-29
  • Sean Guo

    Sean Guo - 2025-08-29

    Hello,

    I recently discovered that class access can be controlled using scope declarations in the portal XML. I’m wondering if it’s possible to redefine these scopes in an extension to customize access, as an alternative to using profiles.

    For example, I tried redefining the Organization class scope in an extension (with the intention of allowing all users to access all Organizations), but it doesn’t seem to have any effect.

    Has anyone successfully done this, or could provide guidance on the right approach?

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0">
      <module_designs>
        <module_design id="itop-portal" xsi:type="portal" _delta="must_exist">
          <classes>
            <class id="Organization" _delta="must_exist">
              <scopes>
                <scope id="all" _delta="redefine">
                  <oql_view><![CDATA[SELECT Organization]]></oql_view>
                </scope>
              </scopes>
            </class>
          </classes>
        </module_design>
      </module_designs>
    </itop_design>
    
     
  • Erwan Taloc

    Erwan Taloc - 2025-08-29

    Hi Sean
    thtat's the right approach and yes you cant customize via an extension all XML part of the datamodel
    As you use alter the portal you need to make sur that your extension depends on the one define de portal which is itop-portal
    so in the module file defining your extension you should have for instance

    'dependencies' => array(
        'itop-portal/3.2.1'
    ),
    

    Else your extension may be loaded before and then will have no effect

    Regards

     
    👍
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.