def initialize_ugm(config, global_config, local_config):
    """Initialize UGM.
    """
    # custom UGM styles
    cfg.merged.css.protected.append((static_resources, 'styles.css'))

    # custom UGM javascript
    cfg.merged.js.protected.append((static_resources, 'ugm.js'))

    # UGM settings
    register_config('ugm_general', GeneralSettings)
    register_config('ugm_server', ServerSettings)
    register_config('ugm_users', UsersSettings)
    register_config('ugm_groups', GroupsSettings)
    register_config('ugm_roles', RolesSettings)
    register_config('ugm_localmanager', LocalManagerSettings)

    # Users container
    register_entry('users', users_factory)

    # Groups container
    register_entry('groups', groups_factory)

    # register default acl's
    # XXX: define permissions referring users, user, groups respective group only
    acl_registry.register(ugm_user_acl, User, 'user')
    acl_registry.register(ugm_default_acl, Users, 'users')
    acl_registry.register(ugm_default_acl, Group, 'group')
    acl_registry.register(ugm_default_acl, Groups, 'groups')

    # localmanager config file location
    lm_config = local_config.get('ugm.localmanager_config', '')
    os.environ['LOCAL_MANAGER_CFG_FILE'] = lm_config

    # add translation
    config.add_translation_dirs('cone.ugm:locale/')

    # static resources
    config.add_view(static_resources, name='cone.ugm.static')

    # scan browser package
    config.scan('cone.ugm.browser')
Initialize UGM.