code: protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder) {
  
          return checkResourcePermissions(
              required,
              neededForFolder,
              Messages.get().container(
                  Messages.GUI_ERR_RESOURCE_PERMISSIONS_2,
                  getParamResource(),
                  required.getPermissionString()));
      }
docs: Checks if the permissions of the current user on the resource to use in the dialog are sufficient.<p>
  
  Automatically generates a CmsMessageContainer object with an error message and stores it in the users session.<p>
  
  @param required the required permissions for the dialog
  @param neededForFolder if true, the permissions are required for the parent folder of the resource (e.g. for editors)
  
  @return true if the permissions are sufficient, otherwise false