RSecurityBackend UserGroupPermissionHandler HandleRequirementAsync IUserPermissionChecker instance IAppUserService instance workspace service constructor UserGroupPermissionRequirement job view constructor User login/logout/register/... login loginViewModel LoggedOnUserModel renew an expired session user session id LoggedOnUserModel Logout user (users need user:delothersession to logout other users) User Session Id Check if my session is valid get logged on user securableitems (permissions) Paginated Users Information (if user does not have user:view permission list only contains him/her information) All Users Information returns user information (if user does not have user:view permission trying to view other users' information fails with a forbidden error) user id user information add a new user (if you are trying to add an admin user you yourself should be admin) id/generated password if required could be retrieved from return value update existing user (if you are trying to update an admin user you yourself should be admin) (if user does not have user:modify permission trying to modify other users' information fails with a forbidden error) user id existingUserInfo.id could be passed empty and it is ignored completely, if password is sent empty it does not has effect true if succeeds set my password delete user (only admin users can delete other admin users, a user cannot delete himself/herself) user id true if succeeds start user self delete process (send a verification email to user) finalize user self delete Checks if user is admin View User Sessions (user needs user:sessions permission to view other users sessions) Set User Image (via FormData, specifying userId as 'id' in formData ) - if Files.count is 0 image would be removed - (users need user:modify to change other users image) new image id Get User Image in base 64 Get User Image returns user roles (if user does not have user:view permission trying to view other users' information fails with a forbidden error) user id user roles remove user from role user id true if succeeds add user to role user id true if succeeds get a captcha image for signup or forgot password captchaimageid - display it using api/rimages/captchaimageid.jpg signup signUpViewModel next step: "verify" or "finalize" verify signup / forgot password / self delete user associated secret email finalize signup process start forgot password process by email signUpViewModel result read only mode Is Sign-up enabled? reset password log user bad behaviuor get user behaviour logs kick out a user IAppUserService instance for client IP resolution IUserPermissionChecker instance IEmailSender instance Image File Service Captcha service Configuration constructor Audit Log Controller Base get all audit logs ordered by time constructor Artifact Service Notifications controller Get User Notifications Get User Notifications (Paginated Version) Get unread user notifications count Switch Notification Status Set All User Notifications Status Read Set All User Notifications Status Unread Delete Notification Delete All Read Notifications Notification Service constructor options controller get user level option, if option value is not found it returns empty string get user level option, Security Warning: every authenticated user could see value of global options, so do not store sensitive data into them get global option value, Security Warning: every authenticated user could see value of global options, so do not store sensitive data into them or you can override this behaviour in your derived class set global option value, Security Warning: every authenticated user could change value of global options, so do not store sensitive data into them or you can override this behaviour in your derived class constructor Options Service Generic Image Provider return image with custom extension temporary api for uploading temporary images constructor image file Service IMemoryCache Long Running Jobs get long running jobs clean up old jobs delete a specific job record, this could be used for deleting records which are not cleanable using the "cleanup" method constructor Jobs Service User roles All Roles Information All Roles Information returns role information role name role information add a new role id if required could be retrieved from return value update existing role role name existingGroupInfo.id could be passed empty and it is ignored completely true if succeeds delete role role name true if succeeds lists role permissions Saves role permissions role name Get All SecurableItems All All SecurableItems IUserRoleService instance constructor Worspace API add workspace (if you want it to be limited override WorkspaceService.RestrictWorkspaceAdding to look at workspace:add ) Update workspace delete workspace user workspaces (member or owner) members are invalid get user workspace information workspace service IUserPermissionChecker instance IAppUserService instance workspace service Workspace Members delete member get workspace members (if RestrictWorkspaceMembersQueryToAuthorizarion returns true looks at workspace:vumembers) change member status add user to role in a workspace remove user from role in workspace get user roles add member (does not send any email) revoke member invitation to a workspace user workspace invitations workspace invitations process workspace invitation leave a workspace set workspace order for user get logged on user securableitems (permissions) in workspace workspace service IUserPermissionChecker instance IAppUserService instance workspace service Workspace User roles All Roles Information All Roles Information returns role information role name role information add a new role id if required could be retrieved from return value update existing role role name existingGroupInfo.id could be passed empty and it is ignored completely true if succeeds delete role role name true if succeeds lists role permissions Saves role permissions role name Get All SecurableItems All All SecurableItems IWorkspaceRolesService instance constructor Security EF DbContext parameterless constructor delete db OnConfiguring Permissions User Sessions Signup Queue Items General Images Captcha Images Audit Logs Events long running jobs Notifications Options User bad behaviour logs Banned emails Workspaces Workspace Permissions Workspace Roles Workspace Users User Workspace Roles workspace user invitation Audit Event Id Event Type Start Date Last Updated Date Duration User Name IP Address Response Code Requset Url Jason Data banned emails (previous users who had been kicked out and their emails are logged to not allow them to signup again) id all capital email cause Role Permissions (a set of defined permision policies which could be assigned to users) default constructor constructor Description Permissions Application User First Name Sur Name User Creation Date user status user image user image id nick name biography web site user screen name if user is locked out purposely as some kind of temporary punishment put the message for him or her here User Status Inactive Active Captcha Image Id Captcha Image Captcha Image Id Captcha Text DateTime Permission line Id SecurableItem short name job Operation short name view App User Session (Temporary) Warning: Instances are supposed to delete when user logs out, so do not link anything serious to it Session Id User Id User Client IP Address Client Application Name My Angular Client Client Language fa-IR Login Date Last Renewal Expiraton Time User Token logs for user bad actions which may due to rule end in him or her being banned from the platform id user id user datetime description User SignUp Queue Id queue type Email PhoneNumber DateTime Secret client IP address client app name Client Language fa-IR Verify Queue Type Sign up by email Forgot Password by email delete user by himself/hersef kick out user securable itmes: forms and ... user role audit global options workspaces worspace role view add modify delete sessions delothersession view all administer invite members remove members change member status modify member role view members list of forms and their permissions workspace forms and their permissions Short Name user Descripttion کاربران Operations (short name + description + has permission) [ [view, مشاهده, true], [add, ایجاد, false] ] operations (rights/permissions) for SecurableItem s default constructor one line constructor Short Name view Descripttion مشاهده Prerequisites Status (has permission) SecurableItemOperation Prerequisite Prerequisite SecureItem ShortName job Prerequisite Operation ShortName view a model suitable for anonymous user sign up by billing users secret for securing signup process Logged On User Model Session Id Security Token User Information Permissions AppUserController.Login parameter username email@domain.com password Test!123 Client App Name Swashbuckle UI Client Client Language fa-IR user informtaion a safe subset of RAppUser Id User Name test User Email email@domain.com User Mobile Phone Number +989121234567 First Name Hamid Reza SurName Mohammadi user status 1 user image nick name biography web site email verified a safe subset of RUserSession Session Id User Client IP Address Client Application Name App Angular Client Client Language fa-IR Login Date Last Renewal user infor used for registeration desired password, if sent empty system generates one Test!123 is admin false reset password view model Email email@domain.com Secret 4ozHJQN0X6CebX0He0/xaznhIjvubfySFnwdoCYLLo8= password Test!123 User Self Delete View Model user password Test!123 CallbackUrl set password model old password new password SignUp View Model Email email@domain.com Client App Name Swashbuckle UI Client Client Language fa-IR Captcha Image Id Captcha Value CallbackUrl User/Cause used for logging a user (bad) behaviour or kicking out him or her User Id cause verified sign up view model Email email@domain.com Secret 4ozHJQN0X6CebX0He0/xaznhIjvubfySFnwdoCYLLo8= password Test!123 First Name Hamid Reza SurName Mohammadi User Mobile Phone Number +989121234567 Workspace (a reference for a set of records separated from each other, users may have access to different workspaces and have different roles in each of them) Id name description worspace create date users having access to the workspace active Workspace Permission line Id SecurableItem short name job Operation short name view Workspace Role default constructor constructor workspace id workspace Description Permissions Workspace User Id User Id User status invite date member from workspace id workspace order for user User Memnership status Owner Member User Workspace Role record id workspace id workspace user id user role id role invite member view model email notify user through internal notification service new workspace model name description Workspace User View Model Id User status invite date member from workspace user invitation Id User Workspace Workspace view model Id name description order worspace create date active am I the owner? workspace user invitation Id user id user workspace id workspace generic option id name value user id user Long Running Job Status Id Name progress value (percent of custom value) Start Time End Time Current Step Exception finished Last Update Time pagination metadat total count page size current page total pages has previous page has next page Paging Parameter Model https://www.c-sharpcorner.com/article/how-to-do-paging-with-asp-net-web-api/ max page size page number starting from 1 actual page size (-1 == all items) settable page size (-1 == all items, 1000 maxpagesize) a generic class containing service method return values + an exception string as a more readable replacement for Tuple and also a solution for writing async methods which do not permit using out parameters constructor Actual result Exception String ToString Image Files Id Original File Name content type Original Image File Size In Byte Original Image Width Original Image Height پوشه محل ذخیره تصویر 2017-08 نام فایل ذخیره شده با بالاترین کیفیت 85007253-09f2-4434-8b7e-1a23db2cd9c9.png datetime Last Modified for caching purposes duplicate RImage (excluding Id) smtp config port server username password from use ssl use tls Notifaction Status Unread Read Archived Deleted notifiction type No action required Action Required warning Error all User Notification Id User Id User DateTime Status Subject Text Notifiation Type User Notification Id DateTime Status Subject Text Notification Type Authentication Service Login user, if failed return LoggedOnUserModel is null replace a (probably expired session) with a new one Logout Does Session exist? is user admin? is user in either of passed roles? Get User Roles remove user from role user id add user to role user id Lists user permissions Has user specified permission returns user information PasswordHash becomes empty all users informations all users having a certain permission add a new user add user to role modify existing user change user password checking old password delete user true if succeeds start leaving Set User Image new user image id Get User Sessions if null is passed returns all sessions Get User Session Get User Image Start signup process using email verify signup / forgot password associated email finalize signup process using email Start forgot password process using email reset password using email delete tenant get principal for token Find User By Email Sign Up/forget passsword/delete Email Subject subject Sign Up/forget passsword/delete Email Html Content html content secret used for generating Jwt token JWT Tokens Expiration Time Out log user bad behaviuor get user behaviour logs lockout a user for a period before kicking out a bad behving user ban him or her from signing up again document the cause get banned email information Audit Log Service get all audit logs ordered by time empty means unfiltered background task queue queue new task get task from que number of tasks Captcha Service Generate Captcha evaluate captcha Image File Service add new picture pass empty if you want a generic date based folder store added image returns image info returns image file stream delete image from database and file system Image Storage Path Long Running Job Progress Service new job Get Job By Id Get Jobs update job delete job clean up finished jobs Authentication Service Login user, if failed return LoggedOnUserModel is null replace a (probably expired session) with a new one add user to role Logout Does Session exist? returns user information PasswordHash becomes empty all users informations Get User Sessions if null is passed returns all sessions Get User Session is user admin? is user in either of passed roles? Get User Roles remove user from role user id add user to role user id Lists user permissions Has user specified permission all users having a certain permission add a new user modify existing user change user password checking old password remove user data delete user true if succeeds start leaving Set User Image Get User Image Start signup process using email verify signup / forgot password associated email finalize signup process using email Start forgot password process using email reset password using email Find User By Email delete tenant EnsureDefaultUserExists secret used for generating Jwt token JWT Tokens Expiration Time Out Token Generation Extract Information From Token get principal for token convert identity errors to string Sign Up/forget passsword/delete Email Subject subject Sign Up/forget passsword/delete Email Html Content html content log user bad behaviuor get user behaviour logs lockout a user for a period before kicking out a bad behving user ban him or her from signing up again document the cause get banned email information Main Database context Image File Service User Role Service Identity User Manageer Identity SignIn Manager Identity Role Manager secret generator Configuration constructor Audit Log Service Implementation get all audit logs ordered by time empty means unfiltered Database Contetxt constuctor IBackgroundTaskQueue implementation new task dequeue task task count Captcha Service Generate Captcha evaluate captcha Image File Service Database Contetxt constructor Image File Service Add Image File store added image returns image info delete image (from database and file system) Get Image Storage Path Image Storage Path Database Contetxt Configuration constructor Long Running Job Progress Service new job Get Jobs Get Job By Id update job delete job clean up finished jobs Database Contetxt constructor mail sender using MailKit constructor Configuration options SmptConfig send email Paginator paginate BackgroundService implementation constructor task queue execute Custom Audit Data Provider Insert Insert Async Update Update Async Get Get Async s is disposed dispose Protected implementation of Dispose pattern. Connection constructor generic options service modify an option or add a new one if an option with the requested name does not exist get option value get option value using context Database Contetxt constructor Internal messaging system implementation Add Notification Switch Notification Status updated notification object Set All User Notifications Status Delete Notification if empty deletes all read notifications Get User Notifications Get User Notifications (paginated version) Get Unread User Notifications Count Database Contetxt constructor User Roles Service Implementation Administrator role name returns all user roles returns user role information modify existing user role delete user role true if succeeds adds a new user role new role info update user role info (id) Has role specified permission roles having specific permission gets list of SecurableItem, should be reimplemented in end user applications Lists role permissions Saves role permissions Identity Role Manager constructor Secret Generator Generates a secret Permission checker service implementation check to see if user has permission to do operation userId form operation true if has permission IAppUserService instance workspace service constructor Workspace Role Service implementation Administrator role name returns all user roles find role by name returns user role information modify existing user role delete user role true if succeeds adds a new user role new role info update user role info (id) Has role specified permission roles having specific permission gets list of SecurableItem, should be reimplemented in end user applications Lists role permissions Saves role permissions Database Context constructor Workspace service implementation add workspace Update workspace delete workspace member workspaces get user workspace information get workspace members is user workspace member add member revoke invitation user invitations workspace invitations delete member leave a workspace change member status process workspace invitation add user to role in a workspace remove user from role in workspace is user in role in workspace get user roles has permission set workspace order is admin Lists user permissions restrict workspace adding allow inviting users to workspaces by default restrict worpspace members query Database Context Workspace roles servoce Identity User Manageer Options service Notification Service constructor generic options service modify an option or add a new one if an option with the requested name does not exist get option value, if option value is not found it returns empty string get option value using context Internal messaging system interface Add Notification Get User Notifications Get User Notifications (paginated version) Get Unread User Notifications Count Switch Notification Status updated notification object Set All User Notifications Status Delete Notification if empty deletes all read notifications Secret Generator Generates a secret Permission checker service check to see if user has permission to do operation userId sessionId form operation true if has permission User Groups Service Administrator role name returns all user roles returns user role information adds a new user role new role info update user role info (id) modify existing user role delete user role true if succeeds Has role specified permission roles having specific permission gets list of SecurableItem, should be reimplemented in end user applications Lists role permissions Saves role permissions Workspace Role Service Administrator role name returns all user roles find role by name returns user role information modify existing user role delete user role true if succeeds adds a new user role new role info update user role info (id) Has role specified permission roles having specific permission gets list of SecurableItem, should be reimplemented in end user applications Lists role permissions Saves role permissions Workspace service add workspace Update workspace delete workspace member workspaces get user workspace information get workspace members is user workspace member add member (does not send any email) revoke invitation user invitations workspace invitations delete member leave a workspace process workspace invitation change member status add user to role in a workspace remove user from role i is user in role in workspace is admin get user roles has permission set workspace order Lists user permissions restrict workspace adding allow inviting users to workspaces by default restrict worpspace members query Audit.NET Environment Skipping https://stackoverflow.com/questions/59627835/dont-include-environment-in-serialised-auditevents instance create property PersianIdentityErrorDescriber