Exago .NET API Documentation
Role Class
Members  Example 
WebReports.Api.Roles Namespace : Role Class

Roles are created to specify how a user or group of users interfaces with Exago. Roles can restrict access to folders or data objects. Roles can also override the General Settings.

A Role object refers to the definition of an Exago Role. At minimum, a role contains an ID (name), a General object representing any General Settings overrides and a Security object representing data object or report tree folder tenancy.

Object Model
Role ClassGeneral ClassSecurity Class
Syntax
public class Role : WebReports.Api.Common.ConfigObj 
Example
Create a new Role, set some security and general settings then activate the Role.
api.Roles.NewRole("Restricted User");
Role r = api.Roles.GetRole("Restricted User");

//Allow user only to run a report with, but not create a report level custom SQL object
r.General.AllowReportCustomSQLObjects = false;
r.Security.IncludeReportCustomSQLObjects = true;
r.Security.DataObjects.IncludeAll = false;

//Limit the user to ONLY their My Reports folder
r.Security.Folders.AllowManagement = false;
r.Security.Folders.IncludeAll = false;
Folder f = r.Security.Folders.NewFolder();
f.Name = "My Reports";

r.Activate(true);
Inheritance Hierarchy

System.Object
      WebReports.Api.Roles.Role

See Also

Reference

Role Members
WebReports.Api.Roles Namespace