Skip to content

Conversation

@PierreSmits
Copy link
Member

Currently, when using a userId with only VIEW permission, the Commission Run trigger (menuItem) presents a screen to search and find invoices applicable for the underlying service of creating commission invoices.
On the result shown, the user has access to triggers (functionalities) reserved for users with CREATE/UPDATE permissions.
See (test with): https://demo-trunk.ofbiz.apache.org/accounting/control/CommissionRun and from date= 12/1/1999 12:00:00 AM

Modified:
InvoiceScreens.xml (in AP) - screen CommissionRun

  • restructured the screen to show result based on permissions
  • added reference to template for users with VIEW permissions

Added:
CommissionRunSearchResult.ftl template for users with VIEW permissions

Currently, when using a userId with only VIEW permission, the Commission Run trigger (menuItem) presents a screen to search and find invoices applicable for the underlying service of creating commission invoices.
On the result shown, the user has access to triggers (functionalities) reserved for users with CREATE/UPDATE permissions.
See (test with): https://demo-trunk.ofbiz.apache.org/accounting/control/CommissionRun and from date= 12/1/1999 12:00:00 AM

Modified:
InvoiceScreens.xml (in AP) - screen CommissionRun
- restructured the screen to show result based on permissions
- added reference to template for users with VIEW permissions

Added:
CommissionRunSearchResult.ftl template for users with VIEW permissions
Currently, when using a userId with only VIEW permission, the Commission Run trigger (menuItem) presents a screen to search and find invoices applicable for the underlying service of creating commission invoices.
On the result shown, the user has access to triggers (functionalities) reserved for users with CREATE/UPDATE permissions.
See (test with): https://demo-trunk.ofbiz.apache.org/accounting/control/CommissionRun and from date= 12/1/1999 12:00:00 AM

Modified:
InvoiceScreens.xml (in AP) - screen CommissionRun
- restructured the screen to show result based on permissions
- added reference to template for users with VIEW permissions

Added:
CommissionRunSearchResult.ftl template for users with VIEW permissions
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@JacquesLeRoux
Copy link
Contributor

Hi Pierre,

Why using Freemarker rather than Widgets?

@PierreSmits
Copy link
Member Author

PierreSmits commented Dec 5, 2021

Good afternoon Jacques,

For several reasons:

  1. There is already a template file for users with CREATE/UPDATE permissions, and to keep contribution experience similar to that
  2. This ticket is not about conversions of template code to xml code, but about enhancing the trustworthiness of OFBiz from the viewpoint of the user.

@JacquesLeRoux
Copy link
Contributor

I was only interested in point 1, but thanks

@JacquesLeRoux JacquesLeRoux merged commit 033ab16 into apache:trunk Dec 6, 2021
@PierreSmits PierreSmits deleted the OFBIZ-12433-VIEW-permission-commission-run branch December 6, 2021 11:47
@PierreSmits
Copy link
Member Author

Then you can regard point 2 as a bonus. :)

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.

2 participants