ReportingService2005.GetPermissions(String) Method
Definition
返回与报表服务器数据库中特定项相关联的用户权限。Returns the user permissions that are associated with a particular item in the report server database.
public:
cli::array <System::String ^> ^ GetPermissions(System::String ^ Item);
public string[] GetPermissions (string Item);
member this.GetPermissions : string -> string[]
Public Function GetPermissions (Item As String) As String()
Parameters
- Item
- String
项的完整路径名称。The full path name of the item.
Returns
- String[]
String [] 对象的数组,其中包含与当前用户的已分配任务和项角色关联的权限列表。An array of String[] objects that contains a list of permissions that are associated with the assigned tasks and roles of the item for the current user.
Examples
若要编译此代码示例,必须引用 Reporting Services WSDL 并导入某些命名空间。To compile this code example, you must reference the Reporting Services WSDL and import certain namespaces. 有关详细信息,请参阅 编译和运行代码示例。For more information, see Compiling and Running Code Examples. 下面的代码示例使用 GetPermissions 方法检索与公司销售报表关联的权限:The following code example uses the GetPermissions method to retrieve the permissions associated with the Company Sales report:
Imports System
Imports System.Web.Services.Protocols
Class Sample
Public Shared Sub Main()
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Try
Dim permissions As [String]() = rs.GetPermissions("/SampleReports/Company Sales")
Dim perm As String
For Each perm In permissions
Console.WriteLine(perm)
Next perm
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try
End Sub 'Main
End Class 'Sample
using System;
using System.Web.Services.Protocols;
class Sample
{
public static void Main()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
try
{
String[] permissions = rs.GetPermissions( "/SampleReports/Company Sales" );
foreach ( string perm in permissions )
{
Console.WriteLine( perm );
}
}
catch ( SoapException e )
{
Console.WriteLine( e.Detail.InnerXml.ToString() );
}
}
}
此方法的控制台输出可能类似于以下示例:The console output for this method might look like the following example:
Delete
Execute and View
Read Properties
Update Properties
Update Parameters
Read Data Sources
Update Data Sources
Read Report Definition
Update Report Definition
Create Subscription
Delete Subscription
Read Subscription
Delete Report History
Update Subscription
Create Any Subscription
Delete Any Subscription
Read Any Subscription
Read Security Policies
Update Security Policies
Update Any Subscription
Read Policy
Update Policy
List Report History
Create Report History
Execute
Create Link
Remarks
SOAP 标头SOAP Headers | (Out) ServerInfoHeaderValue(Out) ServerInfoHeaderValue |
所需的权限Required Permissions | 无None |