BuildMaster SDK Reference
Version:

UserContext Class

Represents the current user context.

Inheritance Hierarchy

  • object
    • Inedo.BuildMaster.Web.Security.UserContext

Syntax

public class UserContext

Properties

Name Description
Current

Gets the current web user in context, or null (Nothing in Visual Basic) if there is none

CurrentUserDirectory

Gets the current user directory.

IsAvailable

Gets a value indicating whether a user is currently in context.

UserInfo

Gets information about the user currently in context.

Methods

Name Description
CanPerformTask(ScopedTask scopedTask)

Returns a value indicating whether the current user is allowed to perform the specified task.

CanPerformTask(SecuredTask task, int? applicationGroupId, int? applicationId, int? environmentId, int? serverId)

Returns a value indicating whether the current user is allowed to perform the specified task.

CanPerformTasks(SecuredTask[] tasks)

Returns a value indicating whether the current user is allowed to perform the specified tasks.

CanPerformTasks(System.Collections.Generic.IEnumerable<ScopedTask> scopedTasks)

Returns a value indicating whether the current user is allowed to perform the specified tasks.

GetUserDirectory(int userDirectoryId)

Gets the specified user directory by ID.

SetUser(Inedo.BuildMaster.Extensibility.UserDirectories.IUserDirectoryUser user)

Sets the user info that will persist for the duration of the current HttpContext.

ValidatePrivileges(SecuredTask task, int? applicationGroupId, int? applicationId, int? environmentId, int? serverId)

Verifies that the current user can perform the specified task.

ValidatePrivileges(ScopedTask scopedTask)

Verifies that the current user can perform the specified task.