Skip to content

Commit

Permalink
Merge pull request #16900 from davelopez/remove_invenio_record_access…
Browse files Browse the repository at this point in the history
…_handling

Remove record access handling for Invenio RDM plugin
  • Loading branch information
dannon authored Oct 30, 2023
2 parents f70df51 + c4d225c commit a8b32e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,14 @@ preferences:
description: Your Invenio RDM Integration Settings
inputs:
- name: token
label: Personal Token to upload files to Invenio RDM
label: Personal Token used to create draft records and to upload files
type: secret
store: vault # Requires setting up vault_config_file in your galaxy.yml
required: False
- name: public_name
label: Creator name to associate with new records (formatted as "Last name, First name"). If left blank "Anonymous Galaxy User" will be used.
label: Creator name to associate with new records (formatted as "Last name, First name"). If left blank "Anonymous Galaxy User" will be used. You can always change this by editing your record directly.
type: text
required: False
- name: public_records
label: Whether to make draft records publicly available or restricted.
type: boolean
required: False

# Used in file_sources_conf.yml
onedata:
Expand Down
3 changes: 0 additions & 3 deletions lib/galaxy/files/sources/invenio.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,7 @@ def get_files_in_record(
def create_draft_record(self, title: str, user_context: OptionalUserContext = None) -> RemoteDirectory:
today = datetime.date.today().isoformat()
creator = self._get_creator_from_user_context(user_context)
public = bool(self.get_user_preference_by_key("public_records", user_context))
access = "public" if public else "restricted"
create_record_request = {
"access": {"record": access, "files": access},
"files": {"enabled": True},
"metadata": {
"title": title,
Expand Down

0 comments on commit a8b32e9

Please sign in to comment.