MDM NEW

Update Access

Function: update_access Type: API Endpoint (PUT)

Purpose: This endpoint updates the access rights of a user for a specific application.

URL: PUT /api/new_mdm/update_access

Request Parameters:

  • request (Request): The request object.
  • update_request (UpdateAccessRequest): An object containing details about the user, menu, and table access to be updated.
  • Customer_Key (Header, required): A base64 encoded string containing lscode and firmcode.
  • User_Code (Header, required): A base64 encoded string containing the user code.
  • App_Code (Header, optional): A base64 encoded string containing the application code.
  • db (Session): The database session, obtained via dependency injection.

Process:

  1. Decodes the Customer_Key to extract lscode and firmcode.
  2. Validates the User_Code.
  3. Updates the user details (email, mobile).
  4. Updates the menu access.
  5. Updates the table access.
  6. Fetches the updated user details, menu access, and table access.
  7. Constructs and returns a JSON response detailing the updated access rights.

Response:

  • A JSON object containing the updated user details, menu access, and table access.
  • Indicates success or failure for each step, including any errors encountered.

Exceptions:

  • Handles exceptions related to database operations and invalid customer key formats, providing appropriate error messages.
put/api/new_mdm/update_access

Headers

Customer-Keystring required
User-Codestring required
App-Codestring required

Request body

Response

Successful Response

Changes

No recorded changes to this endpoint across all 1 revision of this API.