Introduction
| English |
|---|
| Bean Shell Permission provides the ability to key in custom Java codes to define the permission checking. |
Image Added
Figure 1: Sample BeanShell permission to allow only
username "admin" to view the menu category.
| Panel |
|---|
| borderColor | green |
|---|
| borderWidth | 1 |
|---|
| titleBGColor | #ddffcc |
|---|
| borderStyle | solid |
|---|
| title | Definition |
|---|
|
| Bean Shell Permission allows one to write its own custom Java coding to determine permission. |
| Name | Description |
|---|
| Plugin Name | Bean Shell Permission |
| Label | Bean Shell Script |
| Applicable for | - Userview
- Userview > Advanced Tools
- Userview Category (Figure 1)
- Form
- Form > Advanced Tools
- Form Section
|
File UploadImage Upload- Datalist > Advanced Tools
|
| Availability | |
Workflow v5 - DX Community Edition
- Joget
|
Workflow v5 - DX Enterprise & Professional 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 you to ease your implementation.
Image Removed
Image Added
Figure 2: Sample variables' values
| Code Block |
|---|
|
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;
} |
...