etendosoftware / com.etendoerp.copilot.extensions

0 stars 0 forks source link

ETP-256: Wrap doGet Method of RestService in Copilot to Handle Access Permission Failures #12

Closed valenvivaldi closed 1 month ago

valenvivaldi commented 1 month ago

Issue Description

The doGet method in RestService for the Copilot application fails when used by users with limited permissions to access the configuration windows. A solution is required to prevent these failures and handle permission restrictions appropriately.

Solution Design

Develop a wrapper class or method for the doGet call in RestService, first checking the user's permissions. If the user lacks the necessary permissions, a response indicating the lack of permissions should be returned instead of allowing the method to fail.

Use Cases

Given: A user with limited permissions tries to use the doGet method of RestService.

When: The user calls the doGet method.

Then: The user's permissions are checked first. If the user lacks the necessary permissions, a response indicating the lack of permissions should be returned without causing the doGet method to fail.

Given: A user with adequate permissions tries to use the doGet method of RestService.

When: The user calls the doGet method.

Then: The doGet method call is executed normally, returning the requested information.

valeg-etendo commented 1 month ago

[!IMPORTANT] Bug resolved in version 1.4.1 ⚡ 🚀