Documentation/configuration/Web Application Configuration

The web application configuration section of the config is where you inform CommunityBridge how your web application (forum/CMS/etc.) stores its user and group information in its database.

If you wish to utilize the primary group synchronization feature and your permissions system does not support primary groups, then you must list groups you wish to be synchronized into the web application's primary group field in the "groups-treated-as-primary" setting in the synchronization options. The permissions systems that this applies to are: bPerms, PermissionsBukkit, PermissionsEx, Vault, and zPermissions.

Terminology

  • Primary group: A group setting such that the setting can only be set to exactly one group. Most web applications have such a feature. Very few permissions systems have such a feature.
  • Secondary group(s): A group setting such that the setting can be set to multiple groups or none.

Primary Group

There's two basic ways a web application might store a primary group id. Either it has a column (typically on the users table) that has the group id in it OR it stores it in a key-value pair on a key-value table.

Method A: Column

If your web application stores the primary group id in a column, you'll need the table name, the user ID column, and the group ID column and it will look similar to this config for phpBB. Note that key-name and key-column are left blank. They will be ignored in this configuration.

app-group-config:
  # If the web application has a primary group/role feature, configure it here.
  primary:
    enabled: true
    # The table that contains the primary group ID.
    table-name: phpbb_users

    # The column on the table that contains the user ID.
    user-id-column: user_id

    # If the primary group is stored in a key-value pair, set this to true.
    uses-key: false

    # The column that the primary group ID is stored in. If uses-key is true,
    # this is the column that the "value" of the key-value pair is stored in.
    group-id-column: group_id

    # If you set uses-key to true, then set the following three settings:
    # Key name for the key-value pair.
    key-name:
    # Column that the key name is in
    key-column:

Method B: Key-Value Pair

If the web application uses this method to store a primary group id, you'll need to know which table the data is stored on, the user_id column, the key-name, the column that the key-name will appear in, and the column that the data value appears in. It might look something like this configuration:

app-group-config:
  # If the web application has a primary group/role feature, configure it here.
  primary:
    enabled: true
    # The table that contains the primary group ID.
    table-name: data_fields

    # The column on the table that contains the user ID.
    user-id-column: user_id

    # If the primary group is stored in a key-value pair, set this to true.
    uses-key: true

    # The column that the primary group ID is stored in. If uses-key is true,
    # this is the column that the "value" of the key-value pair is stored in.
    group-id-column: data_value

    # If you set uses-key to true, then set the following three settings:
    # Key name for the key-value pair.
    key-name: group_id
    # Column that the key name is in
    key-column: data_key

Secondary Groups

Web applications frequently have additional groups beyond the primary group or don't have a primary group. There are four different strategies a forum application might use to store secondary groups.

  • Single: All the group ids are stored in a single column, usually on the users table, separated by a comma or some other delimiter.
  • Key-Value: All the group ids are stored in a single column, but instead of on the users table, stored on a key-value pair table. Will use a delimiter to separate individual group ids.
  • Multiple-key-value: Group IDs are stored on a table of key-value pairs, where the key name can appear in multiple times, once for each group the player is a member of.
  • Junction: There's a special table which will have a column for a user_id and a column for group_id. A given user's id will appear multiple times, once for each group they're a member of.

Comments

Posts Quoted:
Reply
Clear All Quotes