Home.md
... ...
@@ -64,7 +64,7 @@ For demonstration purposes, we will be working with the following information:
64 64
65 65
###Basic Login Scenario
66 66
67
-In this example, we will initialize some of the more common settings. This is done in the [[PostLogin()|/FAQ/PostLogin]] or [[InitializeReporting()|/FAQ/InitializeReporting]] method of your ``CustomAdHocConfig`` class that we discussed earlier.
67
+In this example, we will initialize some of the more common settings. This is done in the [[PostLogin()|/FAQ/PostLogin]] or [[ConfigureSettings()|/FAQ/ConfigureSettings]] method of your ``CustomAdHocConfig`` class that we discussed earlier. This example assumes your license key has already been set previously.
68 68
69 69
``` c#
70 70
//Pass User Credentials
... ...
@@ -78,7 +78,7 @@ AdHocSettings.VisibleDataSources = new string[] { "Products", "Orders", "Custom
78 78
79 79
###Multi-Role Scenario
80 80
81
-Now let's add some logic based on the user's role. In this example, we apply limitations based upon role
81
+Now let's add some logic based on the user's role. In this example, we apply limitations based on whether or not the user is an administrator, report designer, or report viewer. However, your individual roles may vary based on your security model.
82 82
83 83
``` c#
84 84
Izenda.AdHoc.AdHocSettings.ShowSettingsButtonForNonAdmins = false; //Hides the button that redirects to the settings page for non-admins
... ...
@@ -92,10 +92,12 @@ else
92 92
Izenda.AdHoc.AdHocSettings.VisibleDataSources = new string[] { "Products", "Orders", "Customers" }; //non-admins only see certain data sources
93 93
Izenda.AdHoc.AdHocSettings.OutputTypes["sql"].ShowInToolbar = false; //Hides the SQL output icon on the toolbar for non-admins
94 94
if(new List<string>(AdHocSettings.CurrentUserRoles).Contains("ReportViewer")) {
95
- //Role based logic
95
+ AdHocSettings.ShowDesignDashboardLink = false;
96
+ AdHocSettings.ShowDesignLinks = false;
97
+ AdHocSettings.ShowDesignLinkInReportViewer = false;
96 98
}
97 99
else if (new List<string>(AdHocSettings.CurrentUserRoles).Contains("ReportDesigner")) {
98
- //Role based logic
100
+ AdHocSettings.ShowMiscTab = false;
99 101
}
100 102
}
101 103
```
... ...
@@ -107,7 +109,7 @@ else
107 109
Izenda.AdHoc.AdHocSettings.AdHocConfig.PostLogin();
108 110
```
109 111
110
-*Once security is fully configured, add the following code to the [ConfigureSettings()](http://wiki.izenda.us/Adding-Code) method to prevent users from navigating to reports without logging in first.*
112
+*Once security is fully configured, add the following code to the [[ConfigureSettings()|(http://wiki.izenda.us/Adding-Code]] method to prevent users from navigating to reports without logging in first.*
111 113
112 114
``` c#
113 115
// Require Login once security is configured.