Skip to content

aListPermissions statement

The aListPermissions statement returns a collection of permissions for one or more lists.

<aListPermissions tableName="">
<from type=""></from>
<fields></fields>
<where></where>
</aListPermissions>

Specify one or more lists from which to retrieve the columns. The type attribute will indicate how lists are specified.

Type Description
Url Specify one or more list urls separated by a comma. A list url is composed of a relative site url and a list name separated by a semi-colon. A report’s parameter may be specified instead of a literal value.
ResultSet Specify the tableName value of another statement. The resulting data from the statement must contain a column named “relativeSiteUrl” and a column named “Title”.

The following statement will return all the permissions for the list “Products” located in the web site “/sites/ersdedemo/” and for the list “Tasks” located in the web site “/sites/ersdetest”.

Sample

<aListPermissions tableName="ListPermissions">
<from type="Url">
/sites/ersdedemo/;Products,
/sites/ersdetest/;Tasks
</from>
<fields>*</fields>
<where></where>
</aListPermissions>

In the following example, the query will return all the permissions for the lists specified in another result set called “MergingList”. The “MergingList” result set contains data returned by a list statement that queries the “Merging List” SharePoint list.

The SharePoint list “Merging list” must contain a column called “RelativeSiteUrl” that contains relative urls that point to SharePoint sites and a column called “Title” that contains the name of a list.

The aListPermissions statement will retrieve list permissions for each item in the “MergingList” result set based on the “RelativeSiteUrl” and “Title” column’s values.

Sample

<root xmlns="http://enesyssoftware.com/schemas">
<list title="Merging list" relativeSiteUrl="/sites/demo/" tableName="Merginglist">
<fields>relativeSiteUrl,Title</fields>
<query></query>
</list>
<aListPermissions tableName="aListPermissions">
<from type="ResultSet">Merginglist</from>
<fields></fields>
<where></where>
</aListPermissions>
<resultSet>aListPermissions</resultSet>
</root>

Specify the fields to be returned by the statement.

Field Description
MemberID The ID of the User or the group.
Mask A mask of permission flags.
MaskAsString The string representing the mask of permission flags. Values are comma separated.
MemberIsUser Boolean that specifies whether the member is a user.
MemberGlobal Boolean that specifies whether the member is a group.
Name The login name of the user if MemberIsUser is TRUE; otherwise the group name.

SQL Where clause used to filter the resulting data.

The following query returns information about permissions for the “Products” list located in the “/sites/demo” site for all users and groups that have full rights on the list:

Sample

<aListPermissions tableName="aListPermissions1">
<from type="Url">/sites/demo/;Products</from>
<fields></fields>
<where>Mask = -1</where>
</aListPermissions>