Problem/Motivation

Currently, any user that has the persmission of "View expense and income reports" can view all income/expense reports for any user.
can we possibly improve that by allowing two permissions:

1- View own expense and income reports
2- View any expense and income reports

and allowing certain users to generate reports for thier own income/expenses only. i do not think it is possible atm. please correct me if wrong.

thanks
Daniel.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

dwahba created an issue. See original summary.

dwahba’s picture

Issue summary: View changes
sujan shrestha’s picture

Version: 1.3.5 » 2.0.x-dev
Status: Active » Fixed

Implemented in 2.0.x (commit 95ecfcb), released in 2.0.3:

"View own expense and income reports" (reports expense_tracker) now limits all report totals to the viewer's own transactions, and hides the author filter.
New permission: "View any expense and income reports" (reports all expense_tracker) shows every user's data.
Update hook expense_tracker_update_9007 gives the new permission to every role that already had report access, so existing sites keep their current behaviour after drush updb.
Kernel tests cover both permissions and the update hook.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.