-
Notifications
You must be signed in to change notification settings - Fork 189
[instruments] Add view permission #9762
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
Conversation
|
"raisinbread/RB_files/RB_permissions.sql" needs to be updated as well. |
| INSERT INTO `permissions` (`permID`, `code`, `description`, `moduleID`, `action`, `categoryID`) VALUES (82,'imaging_uploader_nosessionid', 'Imaging Scans with no session ID',22,'View',2); | ||
| INSERT INTO `permissions` (`permID`, `code`, `description`, `moduleID`, `action`, `categoryID`) VALUES (83,'dicom_archive_nosessionid','DICOMs with no session ID',15,'View',2); | ||
| INSERT INTO `permissions` (`permID`, `code`, `description`, `moduleID`, `action`, `categoryID`) VALUES (84,'dicom_archive_view_ownsites','DICOMs - Own Sites',15,'View',2); | ||
| INSERT INTO `permissions` (`permID`, `code`, `description`, `moduleID`, `action`, `categoryID`) VALUES (85,'view_instrument_data','Data Query Tool - View Instrument Data',26,'View',2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to add the permission to the SQL/0000-00-00-permissions.sql file so that new installs have it
SQL/0000-00-02-Permission.sql
Outdated
| ('imaging_uploader_nosessionid', 'Imaging Scans with no session ID', (SELECT ID FROM modules WHERE Name='imaging_uploader'), 'View', '2'), | ||
| ('dicom_archive_nosessionid', 'DICOMs with no session ID', (SELECT ID FROM modules WHERE Name='dicom_archive'), 'View', '2'), | ||
| ('dicom_archive_view_ownsites', 'DICOMs - Own Sites', (SELECT ID FROM modules WHERE Name='dicom_archive'), 'View', '2') | ||
| ('view_instrument_data', 'Data Query Tool - View Instrument Data', (SELECT ID FROM modules WHERE Name = 'instruments'), 'View', '2') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SQL/0000-00-02-Permission.sql at the end of the line 149 missing a comma.
|
Hey @adamdaudrich, Although thats a good first step, I dont see the code to restrict data entry for someone who only has view permission, can you clarify how the added permission prevents data entry? maybe include screenshots of instruments with and without the permission? does it also block from modifying the metadata in the left panel of instruments? |
|
@driusan give us your opinion here in terms of view/edit permissions. should data_entry be required to modify the flags at the session level as well? (i think it makes sense at the instrument level) |
|
It would make the most sense to me to require data_entry to modify the flags on the session level |
1bb0480 to
3657d07
Compare
CamilleBeau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I was not able to edit any instrument data, including anything from the sidebar, and I was not able to see behavioural feedback with the "instrument view" permission. Access profile does not show up in this case as well, so the instruments from the instrument module are only viewable with a direct link.
With the "Instrument view" permission, I was able to access the instrument data from the DQT.
1. this hasAccess function returns a call to hasAnyPermission() to check for 'data_entry' and 'view_instrument_data' permissions. Either one will work to access instrument data in the DQT. 2. the SQL insert command adds a new permission to permissions list
1. this hasAccess function returns a call to hasAnyPermission() to check for 'data_entry' and 'view_instrument_data' permissions. Either one will work to access instrument data in the DQT. 2. the SQL insert command adds a new permission to permissions list
Brief summary of changes
-2. the SQL insert command adds a new permission to permissions list
Testing instructions (if applicable)
-remove 'data_entry' permission for your user.
-add Data Query Tool - View Instrument Data to your user
Link(s) to related issue(s)