The following methods, object properties, and operators have been added to the Query Language to retrieve data related to library and access rights.
Methods
- Admins
- AllUsers
- GetUserAccess
- Groups
- Users
- User
Object Properties
- Owner (Valid for: item, issue, attachment, node, HomeLibrary)
Operators
- in
Configurable Graph Example Configuration
<Graph>
<Options>
<ObjIcons/>
</Options>
<NodeStyles>
<NodeStyle name="Library" fillColor="#f9f5a4" fillColor2="#f9f5a4"/>
<NodeStyle name="Group" fillColor="#508ee1" fillColor2="#ffffff"/>
<NodeStyle name="GroupUsers">
<Shape>
<Actor lineColor="#3e58c2"/>
</Shape>
</NodeStyle>
<NodeStyle name="GroupAdmins">
<Shape>
<Actor lineColor="#c2723e"/>
</Shape>
</NodeStyle>
</NodeStyles>
<ApplyTemplate name="LUAR"/>
<Template name="LUAR">
<Variable name="currentItem" as="Items" select="."/>
<ForEach select="HomeLibrary">
<Node style="Library" caption="#{? Name + NewLine + ' Owner: ' + Owner.RealName }">
<ForEach select="$currentItem">
<Node caption="#{? Name + NewLine + 'Owner: ' + Owner.RealName}"/>
<Edge from="." to="Owner" caption="'Access Right: ' + HomeLibrary.GetUserAccess(Owner).Join(', ')"/>
</ForEach>
</Node>
<Edge from="." to="Groups"/>
<Edge from="." to="Owner" caption="'Library Owner'"/>
</ForEach>
<Variable name="Admins" as="Items" select="HomeLibrary.Groups.SelectMany(Admins)"/>
<ForEach select="HomeLibrary.Groups">
<Node style="Group"/>
<Edge from="." to="AllUsers"/>
</ForEach>
<ForEach select="HomeLibrary.AllUsers - HomeLibrary.Groups.SelectMany(AllUsers) ">
<Edge from="$currentItem.HomeLibrary" to="."/>
</ForEach>
<ForEach select="HomeLibrary.AllUsers">
<Choose>
<When test=". in $Admins">
<Node style="GroupAdmins" caption="#{RealName}"/>
</When>
<Otherwise>
<Node style="GroupUsers" caption="#{RealName}"/>
</Otherwise>
</Choose>
</ForEach>
</Template>
</Graph>Example Result

Additional examples can be found in Viewing Library and Access Rights.
ISSUE ID: 14824