File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
lib/osf-components/addon/components/node-card Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -78,21 +78,32 @@ export default class NodeCard extends Component {
7878 }
7979 }
8080
81+ get shouldAllowUpdate ( ) {
82+ if ( this . node instanceof RegistrationModel ) {
83+ return (
84+ this . node . reviewsState === RegistrationReviewStates . Accepted ||
85+ this . node . reviewsState === RegistrationReviewStates . Embargo
86+ ) ;
87+ }
88+ return false ;
89+ }
90+
8191 get shouldShowViewChangesButton ( ) {
8292 if ( this . node instanceof RegistrationModel ) {
83- return this . node . revisionState === RevisionReviewStates . RevisionInProgress ||
84- this . node . revisionState === RevisionReviewStates . RevisionPendingModeration ;
93+ return this . shouldAllowUpdate &&
94+ (
95+ this . node . revisionState === RevisionReviewStates . RevisionInProgress ||
96+ this . node . revisionState === RevisionReviewStates . RevisionPendingModeration ||
97+ this . node . revisionState === RevisionReviewStates . Unapproved
98+ ) ;
8599 }
86100 return false ;
87101 }
88102
89103 get shouldShowUpdateButton ( ) {
90104 if ( this . node instanceof RegistrationModel && this . node . userHasAdminPermission ) {
91105 return this . node . revisionState === RevisionReviewStates . Approved &&
92- (
93- this . node . reviewsState === RegistrationReviewStates . Accepted ||
94- this . node . reviewsState === RegistrationReviewStates . Embargo
95- ) ;
106+ this . shouldAllowUpdate ;
96107 }
97108 return false ;
98109 }
You can’t perform that action at this time.
0 commit comments