Home.md
... ...
@@ -80,6 +80,7 @@ AdHocSettings.VisibleDataSources = new string[] { "Products", "Orders", "Custom
80 80
Now let's add some logic based on the user's role. In this example, we apply limitations based upon role
81 81
82 82
``` c#
83
+Izenda.AdHoc.AdHocSettings.ShowSettingsButtonForNonAdmins = false; //Hides the button that redirects to the settings page for non-admins
83 84
if(AdHocSettings.CurrentUserIsAdmin)
84 85
{
85 86
Izenda.AdHoc.AdHocSettings.VisibleDataSources = new string[] { "Purchasing.Vendor", "Products", "Orders", "Order Details", "Customers" };
... ...
@@ -87,8 +88,7 @@ if(AdHocSettings.CurrentUserIsAdmin)
87 88
else
88 89
{
89 90
Izenda.AdHoc.AdHocSettings.VisibleDataSources = new string[] { "Products", "Orders", "Customers" };
90
- Izenda.AdHoc.AdHocSettings.ShowSettingsButton = false;
91
- Izenda.AdHoc.AdHocSettings.ShowSqlOutputIcon = false;
91
+ Izenda.AdHoc.AdHocSettings.OutputTypes["sql"].ShowInToolbar = false; //Hides the SQL output icon on the toolbar for non-admins
92 92
Izenda.AdHoc.AdHocSettings.HiddenFilters["ShipCountry"] = GetUserCountry();
93 93
}
94 94
```
... ...
@@ -103,7 +103,7 @@ Izenda.AdHoc.AdHocSettings.AdHocConfig.PostLogin();
103 103
*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.*
104 104
105 105
``` c#
106
-// Require Login once security configured.
106
+// Require Login once security is configured.
107 107
AdHocSettings.RequireLogin = true;
108 108
AdHocSettings.LoginUrl = "INSERT_YOUR_LOGIN_PAGE_HERE";
109 109
```
... ...
\ No newline at end of file