Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
fa44f94d
Commit
fa44f94d
authored
Mar 11, 2022
by
Mohammad Nakhaee
Browse files
The edit member button should be disabled for unauthenticated logins or not writers
parent
cbdc5a0a
Pipeline
#125873
passed with stages
in 31 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gui/src/components/uploads/EditMembersDialog.js
View file @
fa44f94d
...
...
@@ -331,6 +331,7 @@ DeleteAction.propTypes = {
function
EditMembersDialog
({...
props
})
{
const
classes
=
useStyles
()
const
{
disabled
}
=
props
const
{
api
}
=
useApi
()
const
{
raiseError
}
=
useErrors
()
const
{
upload
,
setUpload
}
=
useContext
(
uploadPageContext
)
...
...
@@ -409,7 +410,7 @@ function EditMembersDialog({...props}) {
return
<
editMembersDialogContext
.
Provider
value
=
{
contextValue
}
>
<
React
.
Fragment
>
<
IconButton
onClick
=
{
handleOpenDialog
}
>
<
IconButton
onClick
=
{
handleOpenDialog
}
disabled
=
{
disabled
}
data
-
testid
=
'
edit-members-action
'
>
<
Tooltip
title
=
"
Manage upload members
"
>
<
MembersIcon
/>
<
/Tooltip
>
...
...
@@ -454,5 +455,8 @@ function EditMembersDialog({...props}) {
<
/React.Fragment
>
<
/editMembersDialogContext.Provider
>
}
EditMembersDialog
.
propTypes
=
{
disabled
:
PropTypes
.
bool
}
export
default
EditMembersDialog
gui/src/components/uploads/UploadPage.js
View file @
fa44f94d
...
...
@@ -495,7 +495,7 @@ function UploadPage() {
<
/WithButton
>
<
/Grid
>
<
Grid
>
<
EditMembersDialog
/>
<
EditMembersDialog
disabled
=
{
!
isWriter
}
/
>
<
UploadDownloadButton
tooltip
=
"
Download files
"
query
=
{{
'
upload_id
'
:
uploadId
}}
/
>
<
IconButton
disabled
=
{
isPublished
||
!
isWriter
}
onClick
=
{
handleReprocess
}
>
<
Tooltip
title
=
"
Reprocess
"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment