Ticket #9223 (closed: fixed)
Filter publish investigations on GUI
Reported by: | Jay Rainey | Owned by: | Jay Rainey |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | GUI | Keywords: | |
Cc: | Blocked By: | #9208 | |
Blocking: | #8538 | Tester: |
Description
The drop-menu in the publishing interface lists the investigations that the user has read access to via a call to myData. Consequently, the list is populated with several investigations that the user may not have create access to.
To improve this, a new method should be added to ICatalogInfoService (named getPublishInvestigations) that:
- Calls myData to populate a workspace with the investigations the user has read access to.
- For each investigation, call isAccessAllowed (setting accessType to CREATE (3)) to verify that the user can publish datafiles to that investigation.
- If isAccessAllowedResponse is not true, then remove it from the workspace created by myData.
This ensures that only investigations in the drop-menu are those that the user can publish to.
Change History
comment:1 Changed 7 years ago by Jay Rainey
- Summary changed from Show only investigations with write access to Filter publish investigations on GUI
comment:3 Changed 7 years ago by Jay Rainey
- Status changed from assigned to inprogress
Get workspace cell values by name. Refs #9223.
- This way prevents any issues should additional columns be added.
Changeset: e586877e661571c5063eea84057192de05ea49fe
comment:4 Changed 7 years ago by Jay Rainey
Added getPublishInvestigations to interface. Refs #9223.
Changeset: 4b643b1403497d13b2819a813da70589b8029496
comment:5 Changed 7 years ago by Jay Rainey
Added databaseID to workspace output. Refs #9223.
Changeset: 6120113efe52f8587805d1f027c9f922642a8354
comment:6 Changed 7 years ago by Jay Rainey
Add getPublish implementation to ICAT4. Refs #9223.
Changeset: 08d980c635ef837ea83dcc3a457c6e34c2a385e3
comment:7 Changed 7 years ago by Jay Rainey
Hide databaseID on GUI. Refs #9223.
Changeset: ed57305a0069121113a1a66a81bc8db329a13b43
comment:8 Changed 7 years ago by Jay Rainey
Use getPublishInvestigations on GUI instead of myData. Refs #9223.
Changeset: 7b210cc83d3069bcca570a5a33e56ae6b11fdf54
comment:9 Changed 7 years ago by Jay Rainey
Update accessType variable name. Refs #9223.
Changeset: d288de08f6bcbd801b6d1213ad6771e06b9bd3c8
comment:10 Changed 7 years ago by Jay Rainey
Fix warning. Refs #9223.
Changeset: eff77a2eaf100770efd49ff91a913183f4073907
comment:12 Changed 7 years ago by Jay Rainey
- Blocking 8538 added
(In #8538) To add DOI generation support for publishing I need to:
- Generate gSoap files against the DOI generator end-point, which are:
- https://data4.isis.stfc.ac.uk/doi/DOIService?wsdl Develop
- https://sig-03.esc.rl.ac.uk:8181/doi/DOIService?wsdl Production
- Add the end-point (dev for now until changes below are made) to Facilities.xml.
- Update ICatalogInfoService to include a new method (generateDOIForDatafile) that makes use of the gSoap methods above (specifically: registerDatafileDOI) and returns the generated DOI (to output on LOG).
- Add and implement the functionality of the new method above in ICat4Catalog.
- This includes obtaining the end-point from Facilities.xml t oaccomdate other facilities using th
- Add two new properties to CatalogPublish:
- InvestigationID, "",`The database row ID of the investigation that you want to publish to. (Note: this is required to generate a DOI.)
- GenerateDOI, true, "Generates a DOI for the datafile being published. Once a DOI is generated the datafile will be made public."
- Add logic to exec in CatalogPublish to make use of the properties and call generateDOIForDatafile from the catalog. Note: if a file fails to upload (e.g. already exists etc...) a DOI must not be generated.
- Update CatalogPublishDialog to have a checkbox for GenerateDOI. InvestigationID will be hidden on the GUI and obtained from the table generated getPublishInvestigations (once #9223 is complete).
- The generateDOI (make public) checkbox on the GUI should be checked by default.
- To prevent users accidentally generating DOIs that they may not have wanted to, a QMessageBox should be generated IF the user has checked generateDOI to confirm this choice.
comment:13 Changed 6 years ago by Jay Rainey
Merge 'origin/master' into feature/9223_icat_filter_publish. Refs #9223.
Conflicts:
- Code/Mantid/MantidQt/CustomDialogs/src/CatalogPublishDialog.cpp
Changeset: 0b2695c40169fc5217a8db5688b83b489999ab27
comment:14 Changed 6 years ago by Jay Rainey
Regenerate SOAP files against modified WSDL. Refs #9223.
- This was required as the published WSDL is wrong, and does not allow creation of datafiles in datasets.
- Updated date on git hook to allow gSOAP generated file to be added.
Changeset: f087259ae18fc7cbfc66225e651802adec09cbe9
comment:15 Changed 6 years ago by Jay Rainey
Added isAccessAllowed functionality. Refs #9223.
Changeset: dfb7657ec3dbb67fa2ca0e9e430adaf6dd383b6b
comment:16 Changed 6 years ago by Jay Rainey
Improved debug information in getDatasetID. Refs #9223.
Changeset: e6865fc0dbd151a22c9f285929e419f2a074d35d
comment:17 Changed 6 years ago by Jay Rainey
Update datasetID method name to be mantid specific. Refs #9223.
Changeset: e4d27637586f2e44be1f230a121b6db43721fc43
comment:18 Changed 6 years ago by Jay Rainey
Updated ICAT README to include wsdl fix. Refs #9223.
Changeset: 1a642edb6e4aa3b1ed45199d781ba83997ba1f12
comment:19 Changed 6 years ago by Jay Rainey
Fix cppcheck error. Refs #9223.
Changeset: 7973a51d18ddd89389f4158348c348283294023d
comment:20 Changed 6 years ago by Jay Rainey
This ticket addresses the issue of showing investigations on the publish GUI that the user could not publish to by filtering this list by CREATE access.
Notes
- You must have several investigations in my data to test this ticket. Otherwise you may not be able to view the filtering.
- You may have noticed that I commented out this on develop. This will be addressed in #8538 and was necessary to prevent develop breaking.
- I regenerated the gSOAP files to overcome a known ICAT bug. I have updated the ICAT README to reflect this issue, and added the suggested solution.
To test
View behavior before testing
- Download and install the latest release version of Mantid (e.g. 3.1).
- Log into the Catalog.
- Click Publish to open the publishing GUI.
- Observe the number of investigations in the Investigation number drop-menu.
- Select an investigation and try to publish a datafile. A CREATE error will be thrown as you do not have sufficient privileges to publish a datafile to that dataset.
- Select another investigation where you know you can publish (e.g. the Mantid investigation). It should work fine.
View behavior with filter changes
- Build the branch locally and run Mantid.
- Log into the Catalog.
- Click Publish to open the publishing GUI.
- Observe how the number of investigations how decreased and you only see those you can publish to.
- Attempt to publish a datafile to one of the investigations. All should be fine.
comment:21 Changed 6 years ago by Jay Rainey
- Status changed from inprogress to verify
- Resolution set to fixed
comment:22 Changed 6 years ago by Peter Parker
- Status changed from verify to closed
Merge remote-tracking branch 'origin/feature/9223_icat_filter_publish'
Full changeset: 6cd7e381bcb202f231df6711dcf019efd62aab5e
comment:23 Changed 6 years ago by Peter Parker
Looks good to me.
comment:24 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10066