Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly providing user_id to Revisionable #401

Open
commadelimited opened this issue Sep 13, 2021 · 1 comment
Open

Explicitly providing user_id to Revisionable #401

commadelimited opened this issue Sep 13, 2021 · 1 comment

Comments

@commadelimited
Copy link

commadelimited commented Sep 13, 2021

My company uses a 3 tiered system for our web application:

  1. Front end - client layer
  2. Middle layer (composes requests, provides validation and authentication) - accessible by the front end
  3. Backend - where all the database requests are made, not accessible by the front end

In addition we have a SOA architecture which separates parts of our application. For example, the accounts API is completely separate from the Ads API (which is my primary focus). This means that I don't have a User model available to me in the backend API.

Is it possible to explicitly provide a "user_id" to Revisionable instead of relying on some sort of foreign key or implicitly retrieved user id?

The idea would be that a request to retrieve history for an edited record would simply return the provided user_id. We would then merge that with a request against our Accounts API to determine who the actual user was.

We're using Lumen 8.x for middle and back end layers.

@commadelimited
Copy link
Author

Ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant