xTuple.com xTupleU Blog & News Customer Support

Custom Privileges

I created a custom screen and added it in the setup section.

I want to control access to this screen with privileges.

xTuple auto generate privileges when I add screens in the menu but I would like to create my own privileges to segregates the custom stuff I do from the core app.

What would be the best way to do that?

Thanks

I would try adding those privileges directly to the public.priv table.

Javier

You can (freely) add custom privileges to the system via the priv table.

Or you can use the delivered function:

SELECT xt.add_priv(privilege_name, priv_description, module, privilege_group, NULL);

Name and Description should be obvious. Module is to define things like ‘Sales’, ‘Manufacturing’. Look in the priv table for examples. Privilege Group is to define where in the assignment screen the privilege will be found. I would suggest creating a new group for your custom privilege.

Thanks!

It worked well with the function and I created my own group so the xt core stuff is separated from custom stuff.