Hello,
Is it possible to write/read some user-data configuration using ConfigAPI or other API ?
I want to store a couple of lists that will be available to a group of users. In the future, I want to have access to this data from my application, taking into account which user is logged in.
Thank you
Regards
Please explore the Config API Client sample to see the configuration user data.
From what I understand reading your question, you should implement security actions and make it possible to assign or deny user rights to you plugin or items.
You can then use VideoOS.Platform.Util.SecurityAccess.CheckPermission to see if access should be granted.
https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_util_1_1_security_access.html&tree=tree_search.html?search=security+action
There is an element of guessing in my answer, if it does not fit please elaborate on the goal you want to achieve.
@Bo Ellegård Andersen (Milestone Systems)
Thank you for your quick response!
Literally I want to use Milestone Server infrastructure to write/read two key-value lists (up to 100 lines per each) instead of create and host own DB server.
Does it make sense?
The both lists are user-specific, so your suggestion about …SecurityAccess.CheckPermission is very appropriate. Thanks.
I’ve built and ran Config API Client sample and I see this screen:
In which folder exactly I can store my data? Or how I can create my own folder?
Thank you
With your new remarks, I do not think what I wanted you to see fits. I wanted you to see the users, you will find those if you look under roles. See this..
This might be a step as you can find users, but you cannot store information for or about the users here.
For storing information more freely I suggest that you explore the Property sample.
https://doc.developer.milestonesys.com/html/index.html?base=samples/property.html&tree=tree_1.html
Thanks, no more questions about security/access/user_permissions - it’s clear.
But the main question is about storing some data (2 lists as I mentioned above yesterday).
Regarding the Property sample, as I can see the properties is the way to store some data inside SmartClient Plugin or/and Management Client. But does it allow me to store that lists from without SmartClient Plugin or Management Client? I need to access my data exactly from standalone app that interacts with MIP Environment.
Yes, what you ask is possible.
Being a “plugin” sample the Property sample does not show. I found my old experimental code that was never turned into a published sample..
http://download.milestonesys.com/MIPSDK/Samples/PropertySA.zip
(The naming is supposed to give away that this is the Property Standalone sample.)
The both methods VideoOS.Platform.Configuration.GetOptionsConfiguration and SaveOptionsConfiguration - seems like this is what it takes.
Thank you!
What I have to do to be able edit the configuration (saved by SaveOptionsConfiguration) from Management Client? Should I create my own Plugin for Management Client?
Yes.
The Property sample shows a Tools-Options plugin in the Management Client, there are other samples making different kind of UI plugins, maybe one of the tools plugin sample could be used for inspiration.
An alternative to saving “options configuration” is to do MIP Items, I am just mentioning this as there might be more to your solution than I have picked up. If having real items would be a benefit then explore the Sensor Monitor sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/sensormonitor_sample.html&tree=tree_1.html
Recommended read when starting on Management Client plugins: https://developer.milestonesys.com/s/article/debugging-techniques-for-Management-Client-plugins
The both links are very relevant to my solution. Thank you !