Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement(Expense): reduce default permissions for collective admins #10086

Merged
merged 1 commit into from
May 16, 2024

Conversation

Betree
Copy link
Member

@Betree Betree commented May 7, 2024

@Betree Betree self-assigned this May 7, 2024
@Betree Betree force-pushed the enhancement/expense-permissions-comeback branch 3 times, most recently from 34a2faf to b2f3654 Compare May 7, 2024 09:59
@Betree Betree force-pushed the enhancement/expense-permissions-comeback branch from b2f3654 to 176f0c0 Compare May 7, 2024 10:01
Comment on lines +184 to +186
} else if (expense.HostCollectiveId) {
return req.remoteUser.isAdmin(expense.HostCollectiveId);
} else if (!expense.collective) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, kind of unrelated change here: we're relying on the expense HostCollectiveId rather than the current host to check if the remote user is an admin of the expense's host.

@@ -689,10 +689,8 @@ describe('server/graphql/v2/mutation/ExpenseMutations', () => {
});

it('record a breakdown of the values by role (when editing multiple fields)', async () => {
const collectiveAdmin = await fakeUser();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to remove that since collective admins cannot edit expenses anymore

@Betree Betree marked this pull request as ready for review May 7, 2024 10:21
@Betree Betree requested a review from znarf May 7, 2024 11:52
@Betree Betree assigned znarf and unassigned Betree May 7, 2024
@znarf znarf merged commit 3e67d52 into main May 16, 2024
19 checks passed
@znarf znarf deleted the enhancement/expense-permissions-comeback branch May 16, 2024 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should Collective admins have access to private expense details?
2 participants