Example #1
0
  /**
   * Go to detail page
   *
   * @return forward to DETAIL page
   */
  public String detail() {
    Integer id = Integer.parseInt(FacesUtils.getRequestParameter(ROW_ID));
    tag = manager.getEntityById(id);

    return SpringUtils.isAclPermissionGranted(tag, BasePermission.WRITE)
        ? NavigationResults.EDIT
        : NavigationResults.DETAIL;
  }
Example #2
0
 /**
  * Whether or not delete button is available for user
  *
  * @return true if user can delete current object
  */
 public boolean isDeleteAvailable() {
   return (tag.getId() != null) && SpringUtils.isAclPermissionGranted(tag, BasePermission.DELETE);
 }
Example #3
0
 /**
  * Whether or not edit button is available for user
  *
  * @return true if user can edit current object
  */
 public boolean isEditAvailable() {
   return SpringUtils.isAclPermissionGranted(tag, BasePermission.WRITE);
 }