public boolean isEnabled(CmsObject cms) {

        if (getPath().startsWith("/workplace/broadcast") || getPath().equals("/workplace")) {
            if (OpenCms.getRoleManager().hasRole(cms, CmsRole.ACCOUNT_MANAGER)) {
                return true;
            }
        }
        if (getPath().startsWith("/workplace/synchronize_action")) {
            CmsUserSettings settings = new CmsUserSettings(cms);
            CmsSynchronizeSettings syncSettings = settings.getSynchronizeSettings();
            return (syncSettings != null) && syncSettings.isSyncEnabled();
        }
        return OpenCms.getRoleManager().hasRole(cms, CmsRole.WORKPLACE_MANAGER);
    }
public boolean isEnabled ( CmsObject cms ) { if ( getPath ( ) . startsWith ( "/workplace/broadcast" ) || getPath ( ) . equals ( "/workplace" ) ) { if ( OpenCms . getRoleManager ( ) . hasRole ( cms , CmsRole . ACCOUNT_MANAGER ) ) { return true ; } } if ( getPath ( ) . startsWith ( "/workplace/synchronize_action" ) ) { CmsUserSettings settings = new CmsUserSettings ( cms ) ; CmsSynchronizeSettings syncSettings = settings . getSynchronizeSettings ( ) ; return ( syncSettings != null ) && syncSettings . isSyncEnabled ( ) ; } return OpenCms . getRoleManager ( ) . hasRole ( cms , CmsRole . WORKPLACE_MANAGER ) ; }
@see org.opencms.workplace.tools.I_CmsToolHandler#isEnabled(org.opencms.file.CmsObject)