DIGIT mGramSeva
PlatformDomainsAcademyDesign SystemFeedback
v1.2
v1.2
  • Introducing mGramSeva
    • Platform
      • Release Notes
        • Web Caching
        • Service Build Updates
        • MDMS Configuration & Migration Updates
        • Test Cases
        • Release Checklist
        • Implementation Checklist
      • Technology
      • Architecture
      • Demo video
      • Configure mGramSeva
        • Vendor Registry Service
        • User Events Service
        • eChallans Service
        • Water Calculator Service
        • Property Services
        • Billing Service
        • Apportion Service
      • Technical User Docs
        • Application Structure
        • Firebase Analytics Integration
        • Integration Testing
        • Integration Testing With Github Actions
        • Backend Services
          • mGramSeva - Water Services
          • mGramSeva - Water Service Calculator
          • mGramSeva e-Challan Service
          • mGramSeva - User Service
          • mGramSeva - Billing Service
          • mGramSeva - User OTP
          • iFix Adapter Integration Service
          • mGramSeva - Rollout Dashboard
          • mGramSeva Scheduler
          • mGramSeva- Services Re-Indexing
          • mGramSeva Dashboard
          • Events Push To IFIX Adapter
        • Tech User Manual
          • Language Selection
          • Login
          • Change Password
          • Edit Profile
          • Home Page
          • Forgot Password
          • Update Password FTL
          • Generate Bill
          • Search Connection
          • Consumer Details
            • Create Consumer
            • Update Consumer
          • Expenses
            • Add Expenses
            • Search Expense Bills
            • Modify Expenses
          • Dashboards
            • Monthly Dashboard
            • Collections Dashboard
            • Expenditure Dashboard
          • Collect Payment
          • Consumer Feedback
          • Household Register
          • Bluetooth Thermal Printer Integration
        • Application Permissions & Dependencies
        • mGramSeva UI
          • UI Mockups
          • mGramSeva UI
            • mGramSeva - Advance Changes
            • mGramSeva Penalty Changes
      • Installation
      • Configuration
    • Enablement toolkits
      • AWS Installation
        • Setup AWS Account
        • Certificate Purchase
        • Setup Git Repository
        • Domain Name Configuration
        • Create Git Account In The Client Name
      • Setting up Services
        • Getting Started With DIGIT
        • Creating Users
        • Loading Employees For mGramSeva
        • Loading Consumers For mGramSeva
        • Localisation Module
        • Updating Master Rate for Mgramseva
        • Create Consumer API
        • Create User API
        • SMS Template
        • mGramSeva MDMS
        • Create New Tenant
        • Workflow
    • Product Docs
      • Functional Docs
        • Login & Forgot Password
        • User Roles & Home Screen
        • Create Consumer
        • Search Consumer
        • Edit Consumer
        • View Consumer
        • Billing - Bulk Demand Generation
        • Billing - Metered Connection
        • Revenue Collection - Offline
        • Expenditure - Add Expense
        • Expenditure - Modify Expense
        • User Onboarding - Bulk Upload
        • User Onboarding/Walkthrough
        • Feedback - Post Payment
        • SMS Notifications
        • Home Page Notifications
        • Edit User Profile
        • Bill and Receipt PDF
        • Update Expense Search
        • Bulk Demand Generation For Non-Metered Connection
        • Demand/Bill Generation For Metered Connection
        • Household Register
        • Tabular Dashboard - Expense
        • Tabular Dashboard - Collection
        • Download Bills & Receipt
        • App Force Update
        • HRMS
        • Advance Changes
      • User Docs
        • User Manual
  • 🚻Community
    • Roadmap
    • Source Code
    • Discussion
    • Events
    • Training & Certification
Powered by GitBook

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

On this page
  • Overview
  • Pre-requisites
  • Create Users - Steps
  1. Introducing mGramSeva
  2. Enablement toolkits
  3. Setting up Services

Creating Users

This doc provides the steps to create and add users on mgramseva platform post-installation.

PreviousGetting Started With DIGITNextLoading Employees For mGramSeva

Last updated 1 year ago

Overview

Follow the steps provided on this page to create and add users on the mGramSeva platform once the installation is complete.

Pre-requisites

Ensure the Postman utility is installed to run the following scripts. If not, on the local machine.

Create Users - Steps

There are two methods to create users - either through API or through port-forwarding. To create users through port-forwarding refer .

Follow the steps given below to create different types of users through the API.

There are primarily three different types of users as listed below:

  • Super User

  • Anonymous User

  • System User

Super User - A superuser is a privileged user account with elevated access rights in a computer system or application. It is typically reserved for administrators or trusted personnel and grants them full control and unrestricted access to all system resources. Superusers are necessary to manage and maintain the system, perform critical tasks, and troubleshoot issues efficiently.

A Superuser is created using the createnovaildate API. Below is the curl given for creating a superuser.

Steps to follow:

  1. Import the curl given below in Postman.

  2. Refresh the authorisation token.

  3. Provide User data as per requirements. This API will create a Super User in production. To add users in any other environment change the URL.

curl --location 'https://mgramseva-dwss.punjab.gov.in/user/users/_createnovalidate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJQQVlIQWZ1YXpiRFpadlVGdEJSdmFQOWxYaHROXzBUS2FzdUpxZWl3bW04In0.eyJleHAiOjE2NDA0MTM1MjMsImlhdCI6MTYzNzgyMTUyMywianRpIjoiZTZiNmQyNmQtY2EwYS00MDZmLTgxZGYtYTNiOTE0NGEzYTQ3IiwiaXNzIjoiaHR0cHM6Ly9pZml4LXVhdC5wc2Vncy5pbi9hdXRoL3JlYWxtcy9pZml4IiwiYXVkIjoiYWNjb3VudCIsInN1YiI6ImJhMDE1OGFiLWZlYTMtNDc5NC04ZDE3LTRiYjc4MjFhZmM2NyIsInR5cCI6IkJlYXJlciIsImF6cCI6ImlmaXgtdWF0IiwiYWNyIjoiMSIsInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIiwiZmlzY2FsLWV2ZW50LXByb2R1Y2VyIiwiZGVmYXVsdC1yb2xlcy1pZml4Il19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwiY2xpZW50SG9zdCI6IjE5Mi4xNzIuMzIuODYiLCJjbGllbnRJZCI6ImlmaXgtdWF0IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJ0ZW5hbnRJZCI6InBiIiwicHJlZmVycmVkX3VzZXJuYW1lIjoic2VydmljZS1hY2NvdW50LWlmaXgtdWF0IiwiY2xpZW50QWRkcmVzcyI6IjE5Mi4xNzIuMzIuODYifQ.Wemcw5vLajX77GnHJmLq3-NhoEaBcySUyNQCpzfglBojTfF9-7xTk7ripf-VxlR3H5AsULIOsw1vRjTW255_3v-MwlYgRML4YE-d-Bt54v1SVnZ77NQsGRmmZ2UQ4wTwIhYQi2jaqzfTeAdU0fJAQTqo7POpTUcChTz_L6O7MQbVVpDJ3BRoWa5XX-BE6MYqZR1tBrLimvJEUWneohUEpPNncszmUAKEZkhEaiUhh8AzSJA3KtP18JOFC8KOCi7ErL-Vf-bJ928tpsNOMmFM2Syjxnqwu2rHE1ZPLdPUxGt6PGI9oJR7PEShakne0p9Fx-PLP8NxCPFCErq87U6zag' \
--data-raw '{
    "RequestInfo": {
        "api_id": "1",
        "ver": "1",
        "ts": null,
        "action": "create",
        "did": "",
        "key": "",
        "msg_id": "",
        "requester_id": "",
        "authToken": "7d2b5b4f-6053-4633-941c-d30d67bc52b8",
        "token_type": "bearer"
    },
    "User": {
        "userName": "9399998206",                
        "name": "Test",
        "gender": "male",
        "mobileNumber": "9399998206",
        "active": true,
        "type": "EMPLOYEE",
        "tenantId": "pb",
        "password": "eGov@123",
        "roles": [
            {
                "name": "Super User",
                "code": "SUPERUSER",
                "tenantId": "pb"
            }
        ]
    }
}'

The parameters - userName , name , gender, mobileNumber , tenantId , and password can be changed as per requirements.

Anonymous User -An anonymous user is a generic or unauthenticated user account that does not require login credentials to access certain parts of a system or website. These accounts are essential for providing basic access to public information or services without requiring user registration. They are commonly used to ensure accessibility for a wide audience and encourage user interaction while preserving user privacy. These are used when the system is accessing non-authentication links such as bills and payment receipts.

Creating an anonymous user is the same as creating a superuser. The only difference is to change the name and code in roles. The API below is used to create an Anonymous User in production.

curl --location 'https://mgramseva-dwss.punjab.gov.in/user/users/_createnovalidate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJQQVlIQWZ1YXpiRFpadlVGdEJSdmFQOWxYaHROXzBUS2FzdUpxZWl3bW04In0.eyJleHAiOjE2NDA0MTM1MjMsImlhdCI6M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ErL-Vf-bJ928tpsNOMmFM2Syjxnqwu2rHE1ZPLdPUxGt6PGI9oJR7PEShakne0p9Fx-PLP8NxCPFCErq87U6zag' \
--data-raw '{
    "RequestInfo": {
        "api_id": "1",
        "ver": "1",
        "ts": null,
        "action": "create",
        "did": "",
        "key": "",
        "msg_id": "",
        "requester_id": "",
        "authToken": "7d2b5b4f-6053-4633-941c-d30d67bc52b8",
        "token_type": "bearer"
    },
    "User": {
        "userName": "9399998206",
        "name": "Test",
        "gender": "male",
        "mobileNumber": "9399998206",
        "active": true,
        "type": "EMPLOYEE",
        "tenantId": "pb",
        "password": "eGov@123",
        "roles": [
            {
                "name": "anonymous",
                "code": "ANONYMOUS",
                "tenantId": "pb"
            }
        ]
    }
}'

System User - Creating a system user is the same as creating a superuser and anonymous user. The only difference is to change the name and code in roles.

Here, 'pb' is used as tenantId since we are creating users at the state-level.

While creating any user make sure your roles are present in .

Install Postman
here
ACCESSCONTROL-ROLES