• Enable/disable my extension by profiles

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #47855  by mamad
 
Hi dear Jllort,
Based on openkm documentations from here :https://docs.openkm.com/kcenter/view/ok ... nd-ui.html , i created an extension and successfully add it to the Tab Document.
The extensions will show correctly for each document in tab document panel but i don't want this tab to be shown for all users and i need to add a check box in Profiles -> Component -> Tab Document to handle showing/hiding my custom tab based on different profiles.
How to do this ?
I'm using openkm 6.3 community edition and extend openkm using your configured development environment.
Thanks in advance
 #47856  by mamad
 
I guess i can do this by adding my extension to OKM_EXTENSION table
some thing like :
Code: Select all
INSERT INTO OKM_EXTENSION (EXT_UUID,EXT_NAME) VALUES('Extension UUID','Extension Name');
But whats extension uuid ? how i set an uuid for my extension ? How generate it ? does it has a special format or just a string value ?
 #48014  by mamad
 
well , but how to do this ?
In Customization.java class , I add my extension to extensions list using :
Code: Select all
extensions.add(new MyTab()); // MyTab is my custom tab
but no option added to profiles menu to set visibility of my extension based on that profile
 #48015  by mamad
 
Please also tell me how to find the role of user in my extension.
I want to show some part of my extension(for example some buttons) only to users with specific role(maybe just admin role).
Please tell me how to find this ?
for example i can find the document using this line of code : TabDocumentComunicator.getDocument()
i want some thing like this to find the user and its role.some thing like : ?.getUser() to return the current user to me !

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.