question

jacks avatar image
jacks asked Bejoy Nair answered

Is there any way to get the role of currently logged in user of that particular clover terminal?

I am trying to hide/disable certain features in my app based on ROLE of currently logged-in user. For example an ADMIN can access "orders" tab in my app where an EMPLOYEE cannot. How do i get this information?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Bejoy Nair avatar image
Bejoy Nair answered

For getting the role of the Employee you have to use EmployeeConnector of Clover. Use following code with employeeconnector:- Suppose empConnector is the object of EmployeeConnectore class. employeeConnector.getEmployee().getRole();

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community