0

We have defined a ProjectManager role. We want to restrict the list of accessible project. The idea is to only allow access to project to of the user's department. The department information is available in a field of the employee and in a financial dimension on the project.

I've created my xDS and it works fine.

But a project manager can sometimes work on projects for other departments. So I want to "disable" the xDS when the user fills in his timesheets. Because the xDS also restrict the project list when the user add a line in his timesheets.

Do you have an idea?

Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
BBE
  • 1

1 Answers1

1

First of all, you can try to deactivate the XDS for your operation:

XDSServices xds = new XDSServices();
xds.setXDSState(false);
//Do what you have to do
xds.setXDSState(true);

Then, regarding your business case, you may go with this command and restrict the list of projects with a join query. Or you could go to another XDS with a MyProject tempDB table containing all projects the worker works on. Then, you will have no more filtering issue for this. But you'll have to implement additioal filter/restriction on other departements projects.

Geoffrey DELMEE
  • 772
  • 4
  • 8
  • `xds.setXDSState(false)` does not work every time for users with *System Administrator* role or user named *Admin*. – Matej Aug 24 '15 at 10:54
  • The System Administrator role will prevent any access security and it's implicit for Admin user too. In your live environment, the only user which should be part of System Adminitrator role should be Admin user. This Admin user should only be used by IT to run administrative tasks (installation checklists, X++ and CIL compilation, SQL synch, etc...) – Geoffrey DELMEE Aug 25 '15 at 12:23