90c68ddec3ac04727b294b91dae0f745be59f923
Integration/Tutorials/Security.md
| ... | ... | @@ -38,21 +38,19 @@ public static void InitializeReporting() |
| 38 | 38 | The API allows control over which data sources a user sees based on their credentials. In the following example, members of the "Sales" role would see additional data sources that normal users would not. Any reports that utilize these data sources would only be visible to members of the sales role. |
| 39 | 39 | |
| 40 | 40 | ```c# |
| 41 | -public override void PostLogin() |
|
| 42 | -{ |
|
| 43 | -AdHocSettings.VisibleDataSources = new string[] {"Products"}; |
|
| 44 | - if(IsInRole("Sales")) |
|
| 45 | - { |
|
| 46 | - AdHocSettings.VisibleDataSources = new string[] |
|
| 47 | - {"Products", "Categories", "Orders"}; |
|
| 48 | - } |
|
| 49 | -} |
|
| 41 | + |
|
| 42 | + AdHocSettings.VisibleDataSources = new string[] {"Products"}; |
|
| 43 | + if(IsInRole("Sales")) |
|
| 44 | + { |
|
| 45 | + AdHocSettings.VisibleDataSources = new string[] |
|
| 46 | + {"Products", "Categories", "Orders"}; |
|
| 47 | + } |
|
| 50 | 48 | ``` |
| 51 | 49 | |
| 52 | 50 | The method will need to be called from your login process with the following line. |
| 53 | 51 | |
| 54 | 52 | ```c# |
| 55 | -Izenda.AdHoc.AdHocSettings.AdHocConfig.PostLogin() |
|
| 53 | +global_asax.CustomAdHocConfig.InitializeReporting(); |
|
| 56 | 54 | ``` |
| 57 | 55 | |
| 58 | 56 | ###User Driven Report Sharing |
| ... | ... | @@ -88,11 +86,8 @@ public override ReportInfo[] FilteredListReports() { |
| 88 | 86 | The API allows control of deleting or modifying reports. Reports marked Read-Only can not be modified or deleted even if the settings below are enabled. |
| 89 | 87 | |
| 90 | 88 | ```c# |
| 91 | - public static void InitializeReporting() |
|
| 92 | -{ |
|
| 93 | 89 | AdHocSettings.AllowOverwritingReports = true; |
| 94 | 90 | AdHocSettings.AllowDeletingReports = true; |
| 95 | -} |
|
| 96 | 91 | ``` |
| 97 | 92 | |
| 98 | 93 | ###Altering Capabilities by Role and Tenant ID |
| ... | ... | @@ -122,12 +117,6 @@ public static void InitializeReporting() |
| 122 | 117 | } |
| 123 | 118 | ``` |
| 124 | 119 | |
| 125 | -The method will need to be called from your login process with the following line. |
|
| 126 | - |
|
| 127 | -```c# |
|
| 128 | - Izenda.AdHoc.AdHocSettings.AdHocConfig.PostLogin() |
|
| 129 | -``` |
|
| 130 | - |
|
| 131 | 120 | ###Field/Record Level Security |
| 132 | 121 | |
| 133 | 122 | Many applications limit users to specific records based on their credentials. The HiddenFilters API Setting may be used to add hidden filters to reports which limit the results based on the user, their credentials and their tenant. In this example, anyone reporting on the AcmeWidgetSales view will be limited to data in their TerritoryID. |