Call CN.setAccessPolicy() when editing access
Currently Morpho edits the SystemMetadata.AccessPolicy for an EML and/or data file and uploads a new version of those during a save. Instead we should be calling the CN to set the accessPolicy for a package that has been saved to the network.
Here are some ideas:
-For local-only packages, just save the SM accessPolicy change to disk when user hits "ok" after editing the access rules.
-For network/both packages, attempt to save to the Network, if that fails, alert user to try again later. Do not save the change locally either. User will have to wait until the CN synchs with the MN to get the SM.accessPolicy updated.
#4 Updated by ben leinfelder over 9 years ago
For EML object:
-set the SM.AccessPolicy as reflected in the AccessPage
-save SM locally if the package is a local package; call the CN.setAccessPolicy() method if it is saved to network.
-report any errors that may have occurred (no yet synched to CN is common).
-if there are EML-defined access rules (<access/> block) then delete them and mark the EML package as unsaved.
Note that last part about mutating the EML file -- this forces you to save the package again, but it will only happen the first time you do this for a legacy EML file that has a top-level <access/> block. Comments welcome if this is not desired behavior.