Skip to content

Added user and view fields in model and feature #90

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

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

Conversation

rkisdp
Copy link

@rkisdp rkisdp commented Feb 1, 2024

Added 2 extra fields with complete flow to added the information into the database.

@rkisdp
Copy link
Author

rkisdp commented Feb 1, 2024

Hi @vishalanandl177, please review the changes and let me know if you find any problem.

@@ -96,11 +96,11 @@ def added_on_time(self, obj):
added_on_time.short_description = 'Added on'

list_per_page = 20
list_display = ('id', 'api', 'method', 'status_code', 'execution_time', 'added_on_time',)
list_display = ('id', 'api', 'user_id', 'method', 'status_code', 'execution_time', 'added_on_time',)
list_filter = ('added_on', 'status_code', 'method',)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will be better if we add 'user_id' in list_filter too!

Copy link
Author

@rkisdp rkisdp Feb 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very sorry, I don't think it's a good idea because it will make django admin dashboard look not good as list of user_id can be very long if there are many users, @vishalanandl177 what's your take on this?

@ken-turgnate
Copy link

@rkisdp any idea when this PR will merge and a new release will be out?

@rkisdp
Copy link
Author

rkisdp commented Feb 14, 2024

@rkisdp any idea when this PR will merge and a new release will be out?

@ken-turgnate Sorry but I'm not the maintainer of this repository, so can't do or tell you anything about this.

@ken-turgnate
Copy link

Apologies @rkisdp . @vishalanandl177 Any idea on when this land and get released? Thanks

@rkisdp
Copy link
Author

rkisdp commented Mar 29, 2024

Hi @vishalanandl177, any update on this PR? if there something you want me to change? I want to add more features in this module, please let me know.

@tsantor
Copy link

tsantor commented Mar 31, 2024

I'm interested in having the user too. This package is great, but it would be important to know WHO made the call if it was an authenticated user or not.

@ashwanthbalakrishnan5
Copy link

@vishalanandl177 Are you still maintaining the Repo ?

@vishalanandl177
Copy link
Owner

Yes @ashwanthbalakrishnan5

@vishalanandl177
Copy link
Owner

I cannot merge because doing so may violate certain policies, as observed in various enterprise companies.

@rkisdp
Copy link
Author

rkisdp commented Apr 20, 2024

@vishalanandl177 I am very sorry. Can you please tell me what policies I am breaking in this commit? I will fix them.

@vishalanandl177
Copy link
Owner

Based on my recent conversations with several enterprise companies, developers should not have access to user information. Allowing developers to use customer data for personal interests poses a risk.

@stardust85
Copy link

TL; DR: let's make them optional, disabled by default.

Hi fellow users and devs, I have been employed in multiple SP500 enterprises that takes these risks seriously. In such companies segregation of duties is required for example by Sarbane Oxley Act. Segregation of duties means that if you can change code (you are a developer), you cannot read production DB. Only non-production. So it also means, that you cannot read any production data. You simply don't have access to it. You can only access non-production anonymized sample data in non-production DB. If they give production data access to regular developers, they miss the point of Segregation of Duties.

And only in special cases if it not possible to fix the bug without accessing those non-production data, temporary access to production data is allowed, with special approval.

Source: https://www.securends.com/segregation-of-duties/ (a bit commercial, but correct)

So I think storing ID of the user is perfectly OK.

However, to be on the safe side, it can be an option in settings.py, so one can it enable explicitly only if needed. Would it be the way to go?

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.

7 participants