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

refactor: Consolidate dbproxy and user models #461

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

beesaferoot
Copy link
Contributor

@beesaferoot beesaferoot commented Jan 18, 2025

Brief summary of the change made

With this refactor we migrate User model to the root micropowermanager database. Following, we consolidate database proxy model by resolving company id from user table directly from database proxy services.

Consideration for this refactor is that, admin users can see every user on the users table from the user management admin page.

This might have the effect or leaking admin accounts to other admin user.

Closes: #267

Are there any other side effects of this change that we should be aware of?

Describe how you tested your changes?

Pull Request checklist

Please confirm you have completed any of the necessary steps below.

  • Meaningful Pull Request title and description
  • Changes tested as described above
  • Added appropriate documentation for the change.
  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

munyanezaarmel
munyanezaarmel previously approved these changes Jan 20, 2025
@beesaferoot beesaferoot force-pushed the consolidate-databaseproxy-user-tables branch from d189215 to 220e96c Compare January 20, 2025 17:24
@beesaferoot beesaferoot force-pushed the consolidate-databaseproxy-user-tables branch 2 times, most recently from 6a73ced to c2293eb Compare February 1, 2025 16:01
@beesaferoot beesaferoot force-pushed the consolidate-databaseproxy-user-tables branch from c2293eb to 3dc117a Compare February 4, 2025 14:12
@beesaferoot
Copy link
Contributor Author

@dmohns Can you take a look at this when you find the time. Thanks

@beesaferoot beesaferoot force-pushed the consolidate-databaseproxy-user-tables branch from 529a885 to fc55789 Compare February 8, 2025 22:03
@beesaferoot
Copy link
Contributor Author

Consideration for this refactor is that, admin users can see every user on the users table from the user management admin page.
This might have the effect or leaking admin accounts to other admin user.

Update on this: this has been resolved by filtering the users based on their associated company id, that is admin user can only see users associated with the company id.

@dmohns

With this refactor we migrate User model to the root micropowermanager
database. Following, we consolidate database proxy model by resolving
company id from user table directly from database proxy services.

Consideration for this refactor is that, admin users can see every user
on the users table from the user management admin page.

This might have the effect or leaking admin accounts to other admin
user.
@beesaferoot beesaferoot force-pushed the consolidate-databaseproxy-user-tables branch from fc55789 to f8f91d9 Compare February 21, 2025 13:37
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

Successfully merging this pull request may close these issues.

Consolidate DatabaseProxy abstraction layer
2 participants