Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

Bean Shell

Permission allows one to write its own

Permission provides the ability to key in custom Java

coding

codes to

determine

define the permission checking.

NameDescription
Plugin NameBean Shell Permission

Image Added

Figure 1: Sample BeanShell permission to allow only
username "admin" to view the menu category.

LabelBean Shell Script
Applicable for
  • Userview > Advance Tools
  • Userview Category (Figure 1)
  • Form > Advance Tools
  • Form Section
  • File Upload
  • Image Upload
    • Datalist > Advance Tools
    Availability
    • Joget Workflow
    v5
    • DX Community Edition
    • Joget Workflow
    v5
    • DX Enterprise Edition

    ...



    Figure 1: Sample screenshot of Bean Shell Permission in Userview Category

    When writing your own code, these 2 two objects are made available for your to ease your implementation.

    Image RemovedImage Added

    Figure 2: Sample variables' values

    ...

    Code Block
    titleSample Usage
    System.out.println( user.getFirstName() ); //will print "Admin"
    System.out.println( requestParams.get("appId") ); //will print "hr_expense";
     
    if (user.getFirstName().equalsIgnoreCase("Admin")) {
    	return true;
    } else {
    	return false;
    }

     

     

    ...