Skip to content

Commit

Permalink
Merge pull request #1775 from okTurtles/1707-should-block-updating-gr…
Browse files Browse the repository at this point in the history
…oup-setting-unless-group-creator-tries

Disable to change group settings unless group creator tries
  • Loading branch information
taoeffect authored Oct 27, 2023
2 parents 35a8139 + 6556ad8 commit 71c7a71
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
1 change: 0 additions & 1 deletion frontend/views/containers/proposals/DistributionDate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
:disabled='$v.form.$invalid || distributionStarted'
:maxSteps='config.steps.length'
:currentStep.sync='ephemeral.currentStep'
variant='changeDistributionDate'
:shouldImmediateChange='shouldImmediateChangeDistributionDate'
@submit='submit'
)
Expand Down
7 changes: 5 additions & 2 deletions frontend/views/containers/proposals/ProposalTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
:class='submitStyleNonProposal'
v-if='!isConfirmation && !shouldPropose'
@click='submit'
:disabled='disabled'
:disabled='disabled || !isGroupCreator'
data-test='submitBtn'
) {{ submitTextNonProposal }}

Expand Down Expand Up @@ -118,7 +118,7 @@ export default ({
},
variant: {
validator (value) {
return ['addMember', 'removeMember', 'changeDistributionDate'].indexOf(value) > -1
return ['addMember', 'removeMember'].indexOf(value) > -1
}
},
shouldImmediateChange: Boolean
Expand All @@ -137,6 +137,9 @@ export default ({
proposalSettings () {
return this.groupProposalSettings()
},
isGroupCreator () {
return this.ourUsername === this.groupSettings.groupCreator
},
isNextStep () {
return this.currentStep <= this.maxSteps - 1
},
Expand Down
16 changes: 10 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 71c7a71

Please sign in to comment.