Feature Restrictions and Feature Locking

Hi,
In coolwsd.xml there is config for Feature Restriction and Feature Locking…
I referred to this video https://www.youtube.com/watch?v=myvXdVNJypY&ab_channel=CollaboraOnline as well where it is described.

and have prepared and save the code in coolwsd.xml file but its not working…

<feature_lock>
    <locked_hosts allow="true">
        <fallback read_only="false" disabled_commands="true"/> 
    </locked_hosts>
    <locked_commands>.uno:Bold</locked_commands>
    <is_lock_readonly>false</is_lock_readonly> 
</feature_lock>
<restricted_commands>.uno:Italic</restricted_commands>

none of them is working. Setup environment NextCloud plus collab/code

Hello @ANKUSHJAIN91,

For the feature lock or restriction to function, it’s essential that our Collabora build includes the --enable-feature-lock flag. online/configure.ac at master · CollaboraOnline/online · GitHub

for example:

./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include \
            --with-lo-path=${LOCOREPATH}/instdir \
            --enable-debug --enable-cypress --enable-feature-lock

Could you please share your configuration details? Have you enabled this flag in your setup?

Thank you,
Darshan

@ANKUSHJAIN91 I’d like to mention an additional point:

  • If you require feature restriction, you’ll also need to include --enable-feature-restriction for it to function properly.

Apologies for missing this earlier.

Thanks,
Darshan

Thanks Darshan for replying back
here is my config in collwsd

<feature_lock>
    <locked_hosts allow="true">
        <fallback read_only="false" disabled_commands="true"/> 
    </locked_hosts>
    <locked_commands>.uno:Bold</locked_commands>
    <is_lock_readonly>false</is_lock_readonly> 
</feature_lock>
<restricted_commands>.uno:Italic</restricted_commands>

do I need to set below while creating the collabora docker container ??
./configure --enable-silent-rules --with-lokit-path=${LOCOREPATH}/include
–with-lo-path=${LOCOREPATH}/instdir
–enable-debug --enable-cypress --enable-feature-lock

like this ??

version: ‘3’
services:
code:
image: collabora/code:latest

restart: always
environment:
  - password=${COLLABORA_PASSWORD}
  - username=${COLLABORA_USERNAME}
  - aliasgroup1=https://****:443
  - server_name=*****
  - extra_params=--o:ssl.enable=true
  **- enable-feature-lock = true**
ports:
  - 9980:9980
networks:
  - proxy

networks:
proxy:
external: true

@ANKUSHJAIN91 You need to pass this flag in the same way you handle other flags like SSL. Please conduct some research and use a trial-and-error approach to understand how it is configured in coolwsd.xml using Docker variables.

Thanks
Darshan

1 Like

@ANKUSHJAIN91, you can mount a volume in Docker to include your custom coolwsd.xml settings.

For example:

volumes:
  - /path/to/your/coolwsd.xml:/etc/coolwsd/coolwsd.xml

Thanks,
Darshan

1 Like