Setting the user and administrator state
Setting the user and their access rights
By default, Izenda Reports includes a user account called "defaultadministrator". The setting "CurrentUserIsAdmin" is used to set whether or not the current user is an Administrator user. If set to true, then Ad Hoc allows the current user to have Administrator privileges. These privileges are the ability to see all reports both shared and private, change the owner of a report, and over write the Read only reports. If set to false, then the user can only see shared reports. In this case, we must also set the "CurrentUserName" property to the user's name, which for example, can come from the session variable.
After setting the user name and whether or not the user is an Administrator, one can set the database, table, view, or field level access.
Setting an Administrator user
C#
Izenda.AdHoc.AdHocSettings.CurrentUserIsAdmin = true;
VB.NET
Izenda.AdHoc.AdHocSettings.CurrentUserIsAdmin = true
Setting the user name
C#
Izenda.AdHoc.AdHocSettings.CurrentUserName = "Bob";
VB.NET
Izenda.AdHoc.AdHocSettings.CurrentUserName = "Bob"