Definition
Bean Shell Permission provides the ability to key in custom Java codes to define the permission checking.
| Name | Description | Screen (Click to view) |
|---|---|---|
| Plugin Name | Bean Shell Permission | Figure 1: Sample BeanShell permission to allow only |
| Label | Bean Shell Script | |
| Applicable for |
| |
| Availability |
|
When writing your own code, these two objects are made available for your to ease your implementation.
- user
- requestParams
Figure 2: Sample variables' values
Sample 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;
}
