예제 #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);
  }
예제 #2
0
  public DDLRecord getRecord(long recordId) throws PortalException, SystemException {

    DDLRecord record = ddlRecordLocalService.getDDLRecord(recordId);

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

    return record;
  }
예제 #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);
  }
예제 #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);
  }