Skip to content

Staff Pending

zehavibarak edited this page Dec 20, 2021 · 1 revision

To display only users of shared segments, inherit from PendingResults and override GetUserIdsAsync().

public class MyPendingResults : PendingResults {
    private readonly IHttpContext _httpContext;
    private readonly IIdentityManager _identityManager;
    public MyPendingResults(
        IHttpContext httpContext,
        IIdentityManager identityManager) {
        _httpContext = httpContext;
        _identityManager = identityManager;
    }
    protected override Task<string[]> GetUserIdsAsync() {
        var userIds = _identityManager.Users.
            Where(u=> u.DepartmentId == _httpContext.User.FindFirstValue(Claims.DepartmentId)).
            Select(u => u.UserId).ToArray();
        return Task.FromResult(userIds);
    }
}

The example above finds the user department id from the current user ClaimsPrinciple, and retrieves all users in that department from Users in IdentityManager.

Build the project to enable BizDoc to configure it in bizdoc.json Widgets.

Release Notes

Angular npm, Flutter pub.dev and Nuget packages.

Clone this wiki locally