The following code snippets are fully functional XML security files for Zoola Domains.
Group ID (groupids)
Code Block | ||
---|---|---|
| ||
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted"> <resourceAccessGrants> <!--Row level security --> <resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1"> <resourceAccessGrants> <!--Row level for organisations --> <resourceAccessGrant id="Jointree_1_row_access_grant_20"> <principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['groupids'] }]]></principalExpression> <filterExpression>testProfileAttribute(mdl_groups.id,'groupids')</filterExpression> </resourceAccessGrant> </resourceAccessGrants> </resourceAccessGrantList> </resourceAccessGrants> </securityDefinition> |
User ID (userid)
Code Block | ||
---|---|---|
| ||
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted"> <resourceAccessGrants> <!--Row level security --> <resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1"> <resourceAccessGrants> <!--Row level for organisations --> <resourceAccessGrant id="Jointree_1_row_access_grant_20"> <principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['userid'] }]]></principalExpression> <filterExpression>testProfileAttribute(mdl_user.id,'userid')</filterExpression> </resourceAccessGrant> </resourceAccessGrants> </resourceAccessGrantList> </resourceAccessGrants> </securityDefinition> |
Org ID (orgids)
Code Block | ||
---|---|---|
| ||
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<!--Row level security -->
<resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1">
<resourceAccessGrants>
<!--Row level for organisations -->
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['orgids'] }]]></principalExpression>
<filterExpression>testProfileAttribute(mdl_org.id,'orgids')</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
</resourceAccessGrants>
</securityDefinition> |
Enrolled Course ID (enrolled_courseids)
Code Block | ||
---|---|---|
| ||
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<!--Row level security -->
<resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1">
<resourceAccessGrants>
<!--Row level for organisations -->
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['enrolled_courseids'] }]]></principalExpression>
<filterExpression>testProfileAttribute(mdl_course.id,'enrolled_courseids')</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
</resourceAccessGrants>
</securityDefinition> |
Position ID (positionid)
Code Block | ||
---|---|---|
| ||
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<!--Row level security -->
<resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1">
<resourceAccessGrants>
<!--Row level for organisations -->
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['primary_positionid'] }]]></principalExpression>
<filterExpression>testProfileAttribute(mdl_pos_assignment.positionid,'primary_positionid')</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
</resourceAccessGrants>
</securityDefinition> |
Manager ID (managerid) - Alternate
Code Block | ||
---|---|---|
| ||
<securityDefinition xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema" version="1.0" itemGroupDefaultAccess="granted">
<resourceAccessGrants>
<!--Row level security -->
<resourceAccessGrantList id="JoinTree_1_List" label="ListLabel" resourceId="JoinTree_1">
<resourceAccessGrants>
<!--Row level for organisations -->
<resourceAccessGrant id="Jointree_1_row_access_grant_20">
<principalExpression><![CDATA[authentication.principal.attributes.any{it.attrName in ['userid'] }]]></principalExpression>
<filterExpression>testProfileAttribute(mdl_pos_assignment.managerid,'userid')</filterExpression>
</resourceAccessGrant>
</resourceAccessGrants>
</resourceAccessGrantList>
</resourceAccessGrants>
</securityDefinition> |