Security Deployed classes
Hi Guys,
I'm converting our system from Ensemble 2014 to 2018 and we do have Security package of classes in deployed mode in our 2014 (eg. Users, Role, ...etc) which doesn't exist in our newly installed 2018, so how can I include those classes in 2018?
Thanks
Product version: Ensemble 2018.1
Have you tried to export it from 2014 and import it into 2018 instance using ^SECURITY command?
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
If your classes are in deployed mode, then you need the source code that (hopefully) was saved before deploying the classes.
To what I can see those classes seems to be some kind of system classes or system generated, so I'm wondering if there is a utility to include them or something ?
these are system classes that are part of the product that do exists in the new installed version in the %SYS namespace.
If the Studio screenshot you have posted is not from the %SYS namespace (it really does not seems so), then probably the System package is mapped to that namespace, possibly also the related globals. But...I'm guessing here from the little details and context you provide.
These classes are still in your 2018.1 instance (if they were not you would not be able to log into the System Management Portal), however, the Security.* package only exists in the %SYS Namespace (as it is not a % package it isn't projected to other namespaces). See: https://docs.intersystems.com/ens201817/csp/documatic/%25CSP.Documatic.c...
It may have been that you used package mappings to make the Security.* classes available in your application namespace, or that they were mapped by the product (I don't remember - 2014 is 10 years old at this point ;) ). However, best practice today is to change to temporarily change to the %SYS Namespace in your code if you ever need to call the Security.* package. There are privileged calls in there which you typically don't want directly accessible within your application namespace.
Spot on Ben & Enrico, I've mapped the package in my namespace and now looks good, the only problem is that before doing that, I tried creating Security.Common in my namespace by copying the content of it from my old system then went to my new system right click in Security Package--> new class and pasted the content then save & compile, but before mapping the package as mentioned, I deleted the class from my namespace and after the mapping I can all classes except Security.Common, my namespace now compiles fine with no errors but I'm wondering if that means I lost the Common class from my %Sys namespace as I can't see it there anymore?
Thanks
If you go to the class documentation for the %SYS Namespace, are you able to see the Common class? If not, then you may need to reinstall Ensemble in order to get it back.
Glad to hear that you were able to get to the root of why you couldn't see the other classes!
Thanks Ben, and nope can't see the class there, if I re-install Ensemble on the top of the current one you reckon that would wipe out everything which means loosing what I've done in my namespace such as classes, Or would the install just update the current install?
Thanks