Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Allow user who created Job to edit it #112

Closed
@maxceem

Description

@maxceem

As a part of this issue #12 we have to allow editing jobs for users who have permissions for that.

image

At the moment we are only allowing editing jobs to the BookingManagers and Administrators, but we don't allow edit jobs to customer users who create such jobs.

The reason for this, because TaaS API uses V5 user ids to for createdBy and updatedBy fields:

{ // example job object
  title: "Job title",
  createdBy: "57646ff9-1cd3-4d3c-88ba-eb09a395366c", // <----- V5 User ID
  updatedBy: "077fd578-7463-457f-b6ef-22c02178d7f5"
  // other fields
}

But we don't know the V5 user id of the logged in user, we only know V3 userId and handle:

{
   userId: 40159127 // <----- V5 User ID
   handle: "pshah_manager"
}   

So we have to know somehow V5 User id of the logged-in user client-side. I'm not sure if we have such an endpoint that could be called by any user to obtain it.

FYI @nkumar-topcoder

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions