Read Only mode and the lock.xml file
Overview of Read-Only Mode and lock.xml
The application can operate in a "Read-Only" mode, which restricts users from modifying configuration settings. This mode is controlled by the presence of a lock.xml
file. The file is created and configured through the Data Folder Sharing options under the Configuration ribbon menu, or when a client connects to the data folder.
When Read-Only mode is enabled, the Configuration tab is locked, preventing modifications to:
Card templates: Users cannot create, edit, or delete card templates.
Database connections: Users are restricted from modifying or adding new database connections.
Locking Options and lock.xml
Creation
The Locking dialog box in the Data Folder Sharing options allows users to define how the data folder is locked. This functionality helps manage access to the shared data folder across multiple users or sessions and creates or modifies the lock.xml
file in the data folder:
Default file location:
C:\Users\Public\Public Documents\CardExchange\Data
Enable Locking of the Data Directory
When Enable locking of the data directory is checked, a
lock.xml
file is generated or updated. This file enforces Read-Only mode, restricting modifications to the data folder unless specific locking criteria are met.If unchecked, no locking is applied, and no
lock.xml
file is created.
Locking Criteria
These options are available when locking is enabled and define how restrictive the locking mechanism is:
Lock to the current CardExchange® Producer user: Restricts configuration access to the specific application user (e.g.,
CardExchangeUser
key inlock.xml
).Lock to the current computer: Restricts access to the current machine (e.g.,
Computer
key inlock.xml
).Lock to the current Windows user: Restricts access based on the current Windows account (e.g.,
WindowsUser
key inlock.xml
).
How lock.xml
Controls Read-Only Mode
The lock.xml
file determines whether the application starts in Read-Only mode. Below are key settings within the file:
Key Settings in lock.xml
Locked
key:"True"
: Activates Read-Only mode, locking the Configuration tab."False"
: Unlocks the Configuration tab, allowing full access to settings.
Active
key:"True"
: Confirms that Read-Only mode is active."False"
: Disables Read-Only mode, though theLocked
key must still be checked.
CardExchangeUser
key: Specifies the user profile under which the Read-Only mode is enforced.Computer
key: Specifies the machine name for machine-specific locking.WindowsUser
key: Specifies the Windows user account tied to the Read-Only mode.
Removing Read-Only Mode
To disable Read-Only mode, you can either delete the lock.xml
file or manually modify its contents. Setting both the Locked
and Active
keys to "False"
will also disable the lock.
Steps to Disable Read-Only Mode:
Navigate to the following folder:
C:\Users\Public\Public Documents\CardExchange\Data
Decide on the following actions:
Delete the
lock.xml
file, orEdit the
lock.xml
file and set theLocked
andActive
values to"False"
.
Restart the application. The Configuration tab should now be unlocked, allowing modifications to card templates and database connections.
Important Considerations
Ensure you have proper permissions to delete or modify files in the Data folder.
Deleting or modifying
lock.xml
could affect other users or system-wide configurations, particularly if locking was configured to be machine- or user-specific.