Skip to content

Commit 787acc6

Browse files
committed
Fix: permissions error when creating staged payment using staking method
1 parent 0ec8c22 commit 787acc6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/components/v5/common/ActionSidebar/hooks/permissions/helpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ export const getPermissionsNeededForAction = (
100100
case Action.PaymentBuilder: {
101101
return PERMISSIONS_NEEDED_FOR_ACTION.PaymentBuilder;
102102
}
103-
case Action.SplitPayment:
103+
case Action.SplitPayment: {
104104
return PERMISSIONS_NEEDED_FOR_ACTION.SplitPayment;
105+
}
106+
case Action.StagedPayment: {
107+
return PERMISSIONS_NEEDED_FOR_ACTION.StagedPayment;
108+
}
105109

106110
default:
107111
return undefined;

src/components/v5/common/ActionSidebar/hooks/permissions/useHasActionPermissions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ const useHasActionPermissions = () => {
2424
if (
2525
!actionType ||
2626
!decisionMethod ||
27-
decisionMethod === DecisionMethod.Reputation
27+
decisionMethod === DecisionMethod.Reputation ||
28+
decisionMethod === DecisionMethod.Staking
2829
) {
2930
return undefined;
3031
}

src/constants/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export const PERMISSIONS_NEEDED_FOR_ACTION = {
2828
EnterRecoveryMode: [[ColonyRole.Root]],
2929
PaymentBuilder: [[ColonyRole.Administration]],
3030
SplitPayment: [[ColonyRole.Administration]],
31+
StagedPayment: [[ColonyRole.Administration]],
3132
};
3233

3334
export enum Action {

0 commit comments

Comments
 (0)