Exemplo n.º 1
0
  @Override
  public boolean hasPermission(PermissionChecker permissionChecker, long classPK, String actionId)
      throws Exception {

    DDLRecord record = DDLRecordLocalServiceUtil.getRecord(classPK);

    return DDLRecordSetPermission.contains(permissionChecker, record.getRecordSet(), actionId);
  }
Exemplo n.º 2
0
  public DDLRecord getRecord(long recordId) throws PortalException, SystemException {

    DDLRecord record = ddlRecordLocalService.getDDLRecord(recordId);

    DDLRecordSetPermission.check(getPermissionChecker(), record.getRecordSetId(), ActionKeys.VIEW);

    return record;
  }
Exemplo n.º 3
0
  public DDLRecord addRecord(
      long groupId,
      long recordSetId,
      int displayIndex,
      Map<String, Serializable> fieldsMap,
      ServiceContext serviceContext)
      throws PortalException, SystemException {

    DDLRecordSetPermission.check(getPermissionChecker(), recordSetId, ActionKeys.ADD_RECORD);

    return ddlRecordLocalService.addRecord(
        getUserId(), groupId, recordSetId, displayIndex, fieldsMap, serviceContext);
  }
Exemplo n.º 4
0
  public DDLRecord updateRecord(
      long recordId,
      int displayIndex,
      Map<String, Serializable> fieldsMap,
      boolean mergeFields,
      ServiceContext serviceContext)
      throws PortalException, SystemException {

    DDLRecord record = ddlRecordLocalService.getDDLRecord(recordId);

    DDLRecordSetPermission.check(
        getPermissionChecker(), record.getRecordSetId(), ActionKeys.UPDATE);

    return ddlRecordLocalService.updateRecord(
        getUserId(), recordId, displayIndex, fieldsMap, mergeFields, serviceContext);
  }