OCA / helpdesk

Odoo modules for managing a HelpDesk system
GNU Affero General Public License v3.0
146 stars 314 forks source link

[14.0][IMP]helpdesk_mgmt_fieldservice: review fsm_order_close_wizard security #593

Open renda-dev opened 3 months ago

renda-dev commented 3 months ago

proposing again #404

@OCA/helpdesk-maintainers


This commit reviews the security rules around the fsm_order_close_wizard.

The "Complete" button on the fsm.order triggered an access error for fieldservice.group_fsm_user_own. The commit allows fieldservice.group_fsm_user_own to use the wizard as well. However, the wizard is now only shown if the user also has write permission on the specific ticket (so as to play nice with a variety of setups, including helpdesk_mgmt.group_helpdesk_user_own).

If the user has permission to write on the ticket, the wizard will be shown as before; otherwise it will simply be skipped, but the fsm.order will be closed as it should.

There's also some code cleanup on the wizard, such as removing the unused team_id field.