Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys, I've recently discovered in the API Guide there are two Permission classes : IDocumentUserPermissions and ISheetPermissions. As you can find in "Class" the tab "Automation Examples" of the API Guide :
Taking a look into the class ISheetPermissions, I see there is the possibility to enabling / disabling some sheet permissions, as you can see :
But If I take a look into the second Permission class, IDocumentUserPermissions, I've realized that you cannot enabling / disabling permissions, just checking if they are enabled or disabled. As you can see :
I've made some easy macros to enabling / disabling sheetPermissions (ISheetPermissions class methods), but.... is there any possibility to do the same with the second class (IDocumentUserPermissions class methods) ???
It would be great enabling / disabling the whole permissions stuff just in one macro. Don't you think?
Many thanks in advance!!!
a good exploration. it would have been really great if it would be so. but what i have found in a short exploration is: IDocumentUserPermissions class only allows two of its members (Reload and Partial Reload) to be bidirectional READ/WRITE, all the rest are READ ONLY. so unfortunately the facilities are not provided ! But we can play around with the first class(ISheetPermissions) as you mentioned.
Thanks!
Regards, tresesco
What's the use case for disabling/enabling permissions via macro? In what circumstances would you use this?
First of all Tresesco, thanks for your input and clarifications about this stuff.
Hi Rob, thanks for answer my email.
My main idea is to show my own demos imitating the functionality of the .EXE qlikview files.
I've created a Qlikview file which disables user permissions (via macro), and disables document permissions (manually unchecking all the properties of the security tab). (*)
I've also created a user admin (which controls everything) and a user "user", who only can see the charts of the document.
I'm almost done.
I only need to disable via macro or via Registry Settings the following : Variable Overview and the Expression Overview.
By know I have this :
And I would like to disable , if is it possible ,all of the settings tab options, not only the document properties. Any ideas???
Many thanks in advance!!
(*) My first question in the post was to know how to manage document permission properties via macro. Tresesco told me the API has READ ONLY rules for this class, so I uncheck manually the security options.
Hello Marcel,
You may find useful this post, but I'm afraid that this is a client side setting, and not stored in the application.
Hope that helps anyway.
Could you share some of your macros to enable / disable sheetPermissions (ISheetPermissions class methods)? Thanks!