...
In this tutorial, we will following the guideline of developing a plugin to develop our Not Permission plugin. Please also refer to the very first tutorial How to develop a Bean Shell Hash Variable for more details steps.
...
The following of this tutorial is prepared with a Macbook Pro and Joget Source Code version 5.0.0. Please refer to Guideline of for developing a plugin for other platform command.
...
Code Block | ||
---|---|---|
| ||
public void start(BundleContext context) { registrationList = new ArrayList<ServiceRegistration>(); //Register plugin here registrationList.add(context.registerService(NotPermission.class.getName(), new NotPermission(), null)); } |
f. Build it and testing
Let build our plugin. Once the building process is done, we will found a "not_permission-5.0.0.jar" file is created under "not_permission/target" directory.
Then, let upload the plugin jar to Manage Plugins. After upload the jar file, double check the plugin is uploaded and activated correctly.
Let us open an userview and change one of the category permission to Not Permission. We will want the current user not in a "Managers" group.
After done the configuration and save the userview. Let us test it. First, check the admin user is not in "Managers" group.
Check the userview, the "Personal" category configured with not in "Managers" group is shown correctly.
Now, assign the "admin" user to "Managers" group.
The "Personal" category is now disappeared.
8. Take a step further, share it or sell it
You can download the source code from not_permission.zip.
To download the ready-to-use plugin jar, please find it in http://marketplace.joget.org/.