Skip to content

Commit

Permalink
deposit: provide permissions to publish button
Browse files Browse the repository at this point in the history
  • Loading branch information
rekt-hard committed Sep 19, 2024
1 parent 89d93f7 commit fd864ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions invenio_app_rdm/records_ui/views/deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,11 @@ def deposit_create(community=None):
files_locked=False,
permissions=get_record_permissions(
[
"delete_draft",
"manage",
"manage_files",
"delete_draft",
"manage_record_access",
"publish",
]
),
)
Expand Down Expand Up @@ -469,11 +470,12 @@ def deposit_edit(pid_value, draft=None, draft_files=None, files_locked=True):
files_locked=files_locked,
permissions=draft.has_permissions_to(
[
"manage",
"new_version",
"delete_draft",
"manage",
"manage_files",
"manage_record_access",
"new_version",
"publish",
]
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ export class RDMDepositForm extends Component {
</Grid.Column>

<Grid.Column width={16} className="pt-10">
<PublishButton fluid record={record} />
<PublishButton
fluid
permissions={permissions}
record={record}
/>
</Grid.Column>

<Grid.Column width={16} className="pt-0">
Expand Down

0 comments on commit fd864ed

Please sign in to comment.