Accounts
Accounts includes Account Service and Permission Service.
The Account Service includes services for user login and verification, as well as user profile creations, updates and deleting.
The Permission Service includes services for verifying user permission and admin management.
Account Service
GetCurrentUser
This method retrieves the current user and auxiliary information about them in the system.
CurrentUserDto- Parameter: None
GetById
Retrieves a User based on their id.
UserDto- Parameter: int
id
GetRemunerationbyId
Get Remuneration By Id
RemunerationDto- Parameter: int
id
GetLatestRemunerationbyStaffId
Get Latest Remuneration By Staff Id
RemunerationDto- Parameter: int
Satffid
GetRemunerations
Get Remunerations
PaginatedDtoRemunerationDto- Parameter: PaginatedInput
filters
CreateRemuneration
Create Remunerations
RemunerationDto- Parameter: RemunerationInput
input
UpdateRemunerations
Update Remunerations
RemunerationDto- Parameter: int
id, RemunerationInputinput
GetPQEAdjustmentsbyStaffId
Get PQE Adjustments List
PQEAdjustmentDto- Parameter: int
id, PaginatedInputfilters
GetPQEAdjustmentCalculatedbyStaffId
Get PQE Adjustment Decimal Calculated Value
PaginatedDtoPQEAdjustmentDto- Parameter: int
id
CreatePQEAdjustment
Create PQE Adjustment
PQEAdjustmentDto- Parameter: PQEAdjustmentInput
input
GetByEmail
Retrieves a User based on their email address
UserDto- Parameter: string
email
GetUsers
Retrieves a paginated list of users for the provided filters, and a count of the total number of users matching the filter
PaginatedDtoUserListDto- Parameter: UserFilterInput
filters
GetUserBillingRate
Decimal calculations of billing rate
- Parameter: int
userId
GetPermittedReviewers
Filter for a list of potential reviewers
PaginatedDtoUserListDto- Parameter: IEnumerable<
int>offeringIds, UserFilterInputfilters
CreateUser
Creates a new user according the provided UserInput
UserDto- Parameter: UserInput
input
UpdateUser
Updates the specified user according to the UpdateUserInput
UserDto- Parameter: int
id, UpdateUserInputinput
ChangePassword
UserDto- Parameter: UserInput
input
UpdateCurrentUser
Updates the current user's details according to the CurrentUserInput
- Parameter: CurrentUserInput
input
UploadProfilePictureForCurrentUser
- Parameter: Stream
imageData
ValidateCredentialsAsync
Validates User Password Hash against Email in Database.
- Parameter: string
email, stringpassword
ValidateOneTimePasswordAsync
Validates OTP
- Parameter: string
email, stringotp
SetOrUpdateRefreshToken
Add a refresh token or extend the existing refresh token's expiry
- Parameter: int
userId, stringrefreshToken, DateTimeexpiresAt
GetRefreshToken
Retrieves a refresh token for the provided combination of the user id and refresh token
- Parameter: int
userId, stringrefreshToken
RemoveRefreshToken
Removes a refresh token for the provided combination of the user id and refresh token
- Parameter: int
userId, stringrefreshToken
GenerateOneTimePassword
- Parameter: UserDto
user
- Generates OTP randomly,
- Storing in database,
- Sending to User email via SendOTPEmail.
Calls method SendOTPEmail.
SendOTPEmail
Called by GenerateOneTimePassword, triggering OTP Email to be sent via external API SendGrid.
- Parameter: SendEmailInput
input, IFormFileCollectionfilesCalls GetEmailSignature
GetEmailSignature
Called by SendOTPEmail, returning fixed Email Signature for Company.
- Parameter: None
Permission Service
GetById
Retrieves a Role by its id
RoleDto- Paremeter: int id
GetSystemAdminRole
Retrieves the system admin role
RoleDto- Paremeter: None
GetRoles
Retrieves all of the roles in the system
RoleDto- Paremeter: None
CreateRole
Creates a new role in the system according to the provided information
RoleDto- Paremeter: RoleInput
input
UpdateRole
Updates an existing role in the system according to the provided information
RoleDto- Paremeter: int
roleId, RoleInputinput
DeleteRole
Removes an existing role from the system
- Paremeter: int
roleId
GetRolesForUser
Retrieves the roles that have been assigned to the specified user
RoleDto- Paremeter: int
userId
AddRoleToUser
Adds a role to the specified user
- Paremeter: int
userId, introleId
RemoveRoleFromUser
Removes a role from the specified user
- Paremeter: int
userId, introleId
GetPermissions
Retrieves the static list of defined permissions in the system
- Paremeter: None
GetPermissionsForRole
Retrieves the permissions that have been assigned to the specified role
- Paremeter: int
roleId
AddPermissionToRole
Add a single permission to the specified role
- Paremeter: int
roleId, stringpermission
SetPermissionsForRole
Sets the set of permissions that belong to a role
- Paremeter: int
roleId, string[]permissions
RemovePermissionFromRole
Removes a specific permission from a role
- Paremeter: int
roleId, stringpermission
CanAccess
Returns true if the current user has the specified permission based on their assigned roles
- Paremeter: string
permission
CanAccess
Returns true if the current user can access of the specified permissions based on their assigned roles
- Paremeter: params string[]
permissions
GetPermissionsForUser
Retrieves the set of permissions for the current user based on their assigned roles
- Paremeter: int
userId
IsValidPermission
Checks if the string is a valid permission, i.e. has been defined in Permissions
- Paremeter: string
permission
