Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
languagejava
    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.

Image Added

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.

Image Added

Image Added

Image Added

After done the configuration and save the userview. Let us test it. First, check the admin user is not in "Managers" group.

Image Added

Check the userview, the "Personal" category configured with not in "Managers" group is shown correctly.

Image Added

Now, assign the "admin" user to "Managers" group.

Image Added

The "Personal" category is now disappeared.

Image Added

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/.