ODM2 / CZ-Manager

CZ Manager (formerly ODM2 Admin) is an application for site level data management of environmental observations using Observation Data Model 2 (ODM2) for documentation and a detailed walkthrough see:
http://odm2.github.io/CZ-Manager
MIT License
9 stars 12 forks source link

User Privileges to only view #39

Closed lsetiawan closed 7 years ago

lsetiawan commented 8 years ago

Hi @miguelcleon,

Do you know or have you thought of a capability for a user to login and only view the data without changing, adding, or deleting? Thanks.

Best, Don

miguelcleon commented 8 years ago

I've thought about it and it would be nice to have. I think you could set it up just with the permissions structure that django gives you but it would be a pain to setup manually through the web app and I don't understand the database structure of the django tables to write a script. If you could write a script that could create such a user that would be really cool.

lsetiawan commented 8 years ago

Hmm... So does the UI need to change also to allow this "read-only" mode since there are alot of places, where add and change buttons are hardwired?

miguelcleon commented 8 years ago

No I don't think a UI change is needed, but to use the existing UI to do this would just be a pain is all. I could show you, but not today, I need to go home after 6 on the east coast.

miguelcleon commented 8 years ago

actually I just looked at it, maybe it wouldn't work, looks like the permissions are for 'add', 'edit' and 'delete' with no view only option

lsetiawan commented 8 years ago

This ModelAdmin works: https://gist.github.com/aaugustin/1388243

But I have to figure out how it is used for only non super-user. It is a problem yet to be solved. Thanks for the ideas and suggestions.

miguelcleon commented 8 years ago

Have you had a chance to work on this? Emilio said you might do a PR for the updates you made for ORCID IDs and ISGNs late this week. Maybe you have one?

lsetiawan commented 8 years ago

@miguelcleon I haven't had a chance to work on this functionality. Emilio and I haven't discuss about PR yet, but once we figure out how to do this we'll move forward. Thanks

lsetiawan commented 8 years ago

Hi @miguelcleon I am back to working on this. Do you have any further insight on this issue? Thanks.

miguelcleon commented 8 years ago

No I haven't I created http://odm2admin.cuahsi.org/Sandbox/ which points to a copy of the LCZO database I randomly deleted 30% of the data from I was just going to give some trusted people accounts to that and let them do whatever they want.

lsetiawan commented 8 years ago

Ah. Okay. I'll try to look into this again, and see what I can find. I just got done with Lunch, let me know when you're available to talk. Thanks.

miguelcleon commented 8 years ago

I'm available now call me at 215-746-5974

miguelcleon commented 8 years ago

actually let's do a go to meeting talk to Don Tue, Sep 20, 2016 4:00 PM - 4:30 PM Eastern Daylight Time

Please join my meeting from your computer, tablet or smartphone. https://global.gotomeeting.com/join/703384557

You can also dial in using your phone. United States +1 (224) 501-3312

Access Code: 703-384-557

First GoToMeeting? Try a test session: http://help.citrix.com/getready

lsetiawan commented 8 years ago

I am at the gotomeeting.

lsetiawan commented 8 years ago

@miguelcleon Exciting progress in this issue. I am able to make the form People view only when user group is readonly, I'm going to apply these to all the forms in forms.py and clean up the code to meet pep8. See screenshots below.

screenshot 2016-09-21 10 47 43 screenshot 2016-09-21 10 47 57
miguelcleon commented 8 years ago

ok sounds good.

miguelcleon commented 7 years ago

Started testing this out, I found that I can change a sampling feature coordinates from a testuser account in the readonly group. That should not be the case.

image

lsetiawan commented 7 years ago

Hi @miguelcleon , Yea. I noticed this as I was making things read only. I'm still trying to figure out a way to show just the point. Thanks for letting me know. It definitely still need some polishing.

emiliom commented 7 years ago

@miguelcleon, I happened to be looking at issues and saw this. It sounds like this one can be closed, or are there outstanding (sub)issues? FYI, Don is on vacation for the next ~ two weeks. He may be tempted to follow up, but I hope he doesn't :smiley:

miguelcleon commented 7 years ago

Your right this can be closed.