How to deploy resources and roles?
Hi, Community!
Consider I have ResourceA which is used by role RoleA in dev environment and want to deploy it with the solution on a target system.
Would you please share the best practices to make it?
Thank you in advance!
There are many predefined methods defined by Cache under Security.* package to maintain/manage Roles/Users/Resources ...ect.
Specific to your query, you can use below command to export/import Roles:
Roles:
Please refer to below class doc for more: http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25sys&CLASSNAME=Security.Roles&CSPCHD=000000000000gt0xiwWBxf8D77QROEE$c2JR50xdHrcUuUzSzc&CSPSHARE=1
Resources:
http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25sys&CLASSNAME=Security.Roles&CSPCHD=000000000000gt0xiwWBxf8D77QROEE$c2JR50xdHrcUuUzSzc&CSPSHARE=1
In case it's not obvious to people, the Security package is only available in the %SYS namespace.
True John, agree with you. Its only available from %SYS.
Thank you, Bachhar for the thorough and full answer!
What if I want to export Resources only and then manage it on a target system manually?
It's not obvious how to export Resources only.
Thanks :)
Note that apart from Export and Import options -
If you are using a %Installer Manifest for your deployment (for any environment - test or prod) - you can include in that manifest also the creation of Security elements such as Resources and Roles, etc.
For example:
And:
See more information here (in the docs).
[Defining a Role as part of a manifest is also included in an example in [@Eduard Lebedyuk]'s post here]
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue