Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-12093

Add simple contribution without Code for Simple Computed Groups

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.7.3
    • Component/s: Security / Rights
    • Upgrade notes:
      Hide

      Add new contribution type for simple computed groups without java code :

      <extension point="computer" target="org.nuxeo.ecm.platform.computedgroups.ComputedGroupsServiceImpl">
      <!-- userAttibute -->
      <userMetadataGroupComputer enabled="true" xpath="company" groupPattern="grade_%s" name="grade_cg"/>
      <!-- documentMetadata -->
      <documentMetadataGroupComuter xpath="dc:title" whereClause="dc:creator = '%s'" groupPattern="creator_%s" name="creator_cg"/>
      </extension>

      Here, for each user, during the connection time, Nuxeo affect the group grade_xxx where xxx the value of the company metadata stored into the user profile. If the company metadata is empty or contains only spaces no group is affected to the user. For the second contribution, Nuxeo selects documents created by the user, for each document found, we affect the group creator_xxx where xxx is the title of the document.

      Add also the possibility to disable a computed group (simple or not) using the enabled attribute

      Show
      Add new contribution type for simple computed groups without java code : <extension point="computer" target="org.nuxeo.ecm.platform.computedgroups.ComputedGroupsServiceImpl"> <!-- userAttibute --> <userMetadataGroupComputer enabled="true" xpath="company" groupPattern="grade_%s" name="grade_cg"/> <!-- documentMetadata --> <documentMetadataGroupComuter xpath="dc:title" whereClause="dc:creator = '%s'" groupPattern="creator_%s" name="creator_cg"/> </extension> Here, for each user, during the connection time, Nuxeo affect the group grade_xxx where xxx the value of the company metadata stored into the user profile. If the company metadata is empty or contains only spaces no group is affected to the user. For the second contribution, Nuxeo selects documents created by the user, for each document found, we affect the group creator_xxx where xxx is the title of the document. Add also the possibility to disable a computed group (simple or not) using the enabled attribute

      Description

      Add 2 new descriptors in the computer extension point.

      There is two simples use cases where we don't want to add java code as this is always the same logic:

      • Computed Groups based on User Metadata. For instance in the LDAP user reference database, each user has a rank (for army for instance). For instance, we would like that if the user is a General, the user belongs to the rank_General group.
      • Computed groups based on a metadata of a list of documents where the user is referenced.

      Here is an example of contribution:

        <extension point="computer" target="org.nuxeo.ecm.platform.computedgroups.ComputedGroupsServiceImpl">
          <!-- userAttibute -->
          <userMetadataGroupComputer enabled="false" xpath="company" groupPattern="grade_%s" name="grade_cg"/>
          <!-- documentMetadata -->
          <documentMetadataGroupComuter xpath="dc:title" whereClause="dc:creator = '%s'" groupPattern="creator_%s" name="creator_cg"/>
        </extension>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.