RSecurityBackend UserGroupPermissionHandler HandleRequirementAsync IUserPermissionChecker instance constructor UserGroupPermissionRequirement job view constructor User login/logout/register/... login loginViewModel LoggedOnUserModel Logout user (users need user:delothersession to logout other users) User Session Id Check if my session is valid All 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) if passsword is sent empty system genrates one for it which could be retrieved from returned record 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 Checks if user is admin (if user does not have user:viewall permission list it will be failed for any user id other than himself/herself) 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 in base 64 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 result Sign Up Email Subject subject Sign Up Email Html Content html content verify signup / forgot password associated secret email finalize signup process start forgot password process by email signUpViewModel result Forgot Password Email Subject subject Forgot Password Email Html Content html content Is Sign-up enabled? reset password signup callback url forgot password call back url 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 Generic Image Provider returns image stream temporary api for uploading temporary images constructor Artifact 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 base class for controllers needing UserScopeCheck UserScopeCheck method EntityShortName; RBillingSecurableItem.TenantEntityShortName UserScopeCheck method OperationShortName SecurableItem.ViewOperationShortName returns user id if user is a guest, and empty if he/she has access to view all users information can current user read this userId daya Permission Checker Service constructor Security EF DbContext parameterless constructor delete db Permissions User Sessions Signup Queue Items General Images Captcha Images Audit Logs Events Audit Event Id Event Type Start Date Last Updated Date Duration User Name IP Address Response Code Requset Url Jason Data Role Permissions (a set of defined permision policies which could be assigned to users) default constructor constructor Description Permissions Ganjoor Application User First Name Sure Name User Creation Date user status user image user image id 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 Ganjoor 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 Ganjoor Angular Client Client Language fa-IR Login Date Last Renewal Expiraton Time User Token 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 securable itmes: forms and ... user role audit view add modify delete sessions delothersession view all list of 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 admin password Test!123 Client App Name Swashbuckle UI Client Client Language fa-IR user informtaion a safe subset of RAppUser constructor default constructor Id User Name test User Email test@ganjoor.net User Mobile Phone Number +989121234567 First Name Hamid Reza Sure Name Mohammadi user status 1 user image a safe subset of RUserSession constructor Session Id User Client IP Address Client Application Name Ganjoor 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 mohammadi.hr@gmail.com Secret 4ozHJQN0X6CebX0He0/xaznhIjvubfySFnwdoCYLLo8= password Test!123 set password model old password new password SignUp View Model Email mohammadi.hr@gmail.com Client App Name Swashbuckle UI Client Client Language fa-IR Captcha Image Id Captcha Value verified sign up view model Email mohammadi.hr@gmail.com Secret 4ozHJQN0X6CebX0He0/xaznhIjvubfySFnwdoCYLLo8= password Test!123 First Name Hamid Reza Sure Name Mohammadi Ganjoor Chargable Features Setup Active Users GanjoorDoc View GanjoorDoc Full GanjoorRun View GanjoorRun Full Features Chargable Feature For Tenant Id Code Name Feature Name Description if it is not optional it cannot be unselected (boolean) or it might be selected at least at minimum value Feature Type miniumum amount suggested amount has maximum maximum value if a module contains features for other modules added their codeNames here (comma separated) it must be priced according to period or it is a one time cost is it refundable is it setup cost is active prices Chargable Feature Price Row Id Minimum Amount For This Price To be applicable base price: (Minimum Amount whole price) unit price for additional items from (Amount-MinimumAmount) active is effective from which date/time (useful for maintaining histotical data) Chargable Feature For Tenant Type yes/no 0, ... cached billing info code name db name personal tenants have limitted unmodifyable features and are not listed in tenant management panel active last update (use for caching purposes) data is valid until this date and should be refreshed after that because of changes of user billing status auto charge user for tenant validitiy expiration charged features charged feature Id Code Name Feature Name Amount 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 smtp config port server username password from use ssl Authentication Service Login user, if failed return LoggedOnUserModel is null 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 add a new user add user to role modify existing user change user password checking old password delete user true if succeeds Set User Image new user image id Get User Sessions if null is passed returns all sessions 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 Administrator role name secret used for generating Jwt token JWT Tokens Expiration Time Out Audit Log Service get all audit logs ordered by time empty means unfiltered 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 Authentication Service Login user, if failed return LoggedOnUserModel is null 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 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 add a new user modify existing user change user password checking old password delete user true if succeeds 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 delete tenant EnsureDefaultUserExists Administrator role name secret used for generating Jwt token JWT Tokens Expiration Time Out Token Generation Renew Expired token Extract Information From Token convert identity errors to string 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 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 mail sender using MailKit constructor Configuration options SmptConfig send email Paginator paginate Custom Audit Data Provider Insert Insert Async Update Update Async Get Get Async is disposed dispose Protected implementation of Dispose pattern. Connection constructor User Roles Service Implementation 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 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 constructor 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 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 gets list of SecurableItem, should be reimplemented in end user applications Lists role permissions Saves role permissions Audit.NET Environment Skipping https://stackoverflow.com/questions/59627835/dont-include-environment-in-serialised-auditevents instance create property Chargable Feature For Tenant Type yes/no 0, ... 1.222 or large numbers