Platform Configuration API

Last modified by Vincent Massol on 2021/03/17 21:01

cogExtra Configuration APIs related to platform concepts (e.g. user references)
Developed by

XWiki Development Team

0 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Standard


Since XWiki 12.4RC1


See the Configuration API for general configuration concepts.

Configuration Permissions

It's possible to implement permission checking for ConfigurationSource properties, to decide who has the rights to view or modify them.

To implement this check for your ConfigurationSource component, you need to implement the following component role:

public interface ConfigurationSourceAuthorization
     * @param key the key for which to check the access right for
     * @param userReference the reference to the user to check for permissions
     * @param right the right to check (e.g. {@code AccessRight.READ})
     * @return true if the property can be accessed for the passed right (e.g. READ or WRITE)

   boolean hasAccess(String key, UserReference userReference, ConfigurationRight right);

Where ConfigurationRight is defined as:

public enum ConfigurationRight
     * The configuration can be read from.


     * The configuration can be written to.


At the moment, your implementation of ConfigurationSourceAuthorization is not called automatically by the ConfigurationSource, so you'll need to perform the call yourself to check for the rights.

Get Connected