<back to all web services

GetDashboardPermissionsForUserMessage

The following routes are available for this service:
All Verbs/RestApi/Sitefinity/Analytics/GetDashboardPermissionsForUser
All Verbs/RestApi/GetDashboardPermissionsForUser
import 'package:servicestack/servicestack.dart';

class GetDashboardPermissionsForUserMessage implements IConvertible
{
    String? UserName;
    String? UserId;
    String? SiteId;

    GetDashboardPermissionsForUserMessage({this.UserName,this.UserId,this.SiteId});
    GetDashboardPermissionsForUserMessage.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        UserName = json['UserName'];
        UserId = json['UserId'];
        SiteId = json['SiteId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'UserName': UserName,
        'UserId': UserId,
        'SiteId': SiteId
    };

    getTypeName() => "GetDashboardPermissionsForUserMessage";
    TypeContext? context = _ctx;
}

// @DataContract
class DashboardPermission implements IConvertible
{
    // @DataMember
    String? DashboardId;

    // @DataMember
    bool? CanView;

    DashboardPermission({this.DashboardId,this.CanView});
    DashboardPermission.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DashboardId = json['DashboardId'];
        CanView = json['CanView'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DashboardId': DashboardId,
        'CanView': CanView
    };

    getTypeName() => "DashboardPermission";
    TypeContext? context = _ctx;
}

class GetDashboardPermissionsForUserData implements IConvertible
{
    List<DashboardPermission>? Permissions;
    bool? IsAdmin;
    bool? IsAdminRole;

    GetDashboardPermissionsForUserData({this.Permissions,this.IsAdmin,this.IsAdminRole});
    GetDashboardPermissionsForUserData.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Permissions = JsonConverters.fromJson(json['Permissions'],'List<DashboardPermission>',context!);
        IsAdmin = json['IsAdmin'];
        IsAdminRole = json['IsAdminRole'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Permissions': JsonConverters.toJson(Permissions,'List<DashboardPermission>',context!),
        'IsAdmin': IsAdmin,
        'IsAdminRole': IsAdminRole
    };

    getTypeName() => "GetDashboardPermissionsForUserData";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'GetDashboardPermissionsForUserMessage': TypeInfo(TypeOf.Class, create:() => GetDashboardPermissionsForUserMessage()),
    'DashboardPermission': TypeInfo(TypeOf.Class, create:() => DashboardPermission()),
    'GetDashboardPermissionsForUserData': TypeInfo(TypeOf.Class, create:() => GetDashboardPermissionsForUserData()),
    'List<DashboardPermission>': TypeInfo(TypeOf.Class, create:() => <DashboardPermission>[]),
});

Dart GetDashboardPermissionsForUserMessage DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /RestApi/Sitefinity/Analytics/GetDashboardPermissionsForUser HTTP/1.1 
Host: www.asg.com.au 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"UserName":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Permissions":[{"CanView":false}],"IsAdmin":false,"IsAdminRole":false}