feature/viewPermission store snake case instead of camel case in database - fixed Test

This commit is contained in:
hongwei 2025-07-11 17:58:17 +02:00
parent 41a29c3b42
commit f885f8fba9
21 changed files with 1079 additions and 6633 deletions

View File

@ -136,185 +136,179 @@ object SwaggerDefinitionsJSON {
which_alias_to_use = "family",
hide_metadata_if_alias_used = false,
allowed_actions = List(
"can_see_transaction_this_bank_account",
"can_see_transaction_other_bank_account",
"can_see_transaction_metadata",
"can_see_transaction_label",
"can_see_transaction_amount",
"can_see_transaction_type",
"can_see_transaction_currency",
"can_see_transaction_start_date",
"can_see_transaction_finish_date",
"can_see_transaction_balance",
"can_see_comments",
"can_see_narrative",
"can_see_tags",
"can_see_images",
"can_see_bank_account_owners",
"can_see_bank_account_type",
"can_see_bank_account_balance",
"can_see_bank_account_currency",
"can_see_bank_account_label",
"can_see_bank_account_national_identifier",
"can_see_bank_account_swift_bic",
"can_see_bank_account_iban",
"can_see_bank_account_number",
"can_see_bank_account_bank_name",
"can_see_other_account_national_identifier",
"can_see_other_account_swift_bic",
"can_see_other_account_iban",
"can_see_other_account_bank_name",
"can_see_other_account_number",
"can_see_other_account_metadata",
"can_see_other_account_kind",
"can_see_more_info",
"can_see_url",
"can_see_image_url",
"can_see_open_corporates_url",
"can_see_corporate_location",
"can_see_physical_location",
"can_see_public_alias",
"can_see_private_alias",
"can_add_more_info",
"can_add_url",
"can_add_image_url",
"can_add_open_corporates_url",
"can_add_corporate_location",
"can_add_physical_location",
"can_add_public_alias",
"can_add_private_alias",
"can_delete_corporate_location",
"can_delete_physical_location",
"can_edit_narrative",
"can_add_comment",
"can_delete_comment",
"can_add_tag",
"can_delete_tag",
"can_add_image",
"can_delete_image",
"can_add_where_tag",
"can_see_where_tag",
"can_delete_where_tag",
"can_create_counterparty",
CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_METADATA,
CAN_SEE_TRANSACTION_AMOUNT,
CAN_SEE_TRANSACTION_TYPE,
CAN_SEE_TRANSACTION_CURRENCY,
CAN_SEE_TRANSACTION_START_DATE,
CAN_SEE_TRANSACTION_FINISH_DATE,
CAN_SEE_TRANSACTION_BALANCE,
CAN_SEE_COMMENTS,
CAN_SEE_TAGS,
CAN_SEE_IMAGES,
CAN_SEE_BANK_ACCOUNT_OWNERS,
CAN_SEE_BANK_ACCOUNT_TYPE,
CAN_SEE_BANK_ACCOUNT_BALANCE,
CAN_SEE_BANK_ACCOUNT_CURRENCY,
CAN_SEE_BANK_ACCOUNT_LABEL,
CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,
CAN_SEE_BANK_ACCOUNT_IBAN,
CAN_SEE_BANK_ACCOUNT_NUMBER,
CAN_SEE_BANK_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,
CAN_SEE_OTHER_ACCOUNT_IBAN,
CAN_SEE_OTHER_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NUMBER,
CAN_SEE_OTHER_ACCOUNT_METADATA,
CAN_SEE_OTHER_ACCOUNT_KIND,
CAN_SEE_MORE_INFO,
CAN_SEE_URL,
CAN_SEE_IMAGE_URL,
CAN_SEE_OPEN_CORPORATES_URL,
CAN_SEE_CORPORATE_LOCATION,
CAN_SEE_PHYSICAL_LOCATION,
CAN_SEE_PUBLIC_ALIAS,
CAN_SEE_PRIVATE_ALIAS,
CAN_ADD_MORE_INFO,
CAN_ADD_URL,
CAN_ADD_IMAGE_URL,
CAN_ADD_OPEN_CORPORATES_URL,
CAN_ADD_CORPORATE_LOCATION,
CAN_ADD_PHYSICAL_LOCATION,
CAN_ADD_PUBLIC_ALIAS,
CAN_ADD_PRIVATE_ALIAS,
CAN_DELETE_CORPORATE_LOCATION,
CAN_DELETE_PHYSICAL_LOCATION,
CAN_ADD_COMMENT,
CAN_DELETE_COMMENT,
CAN_ADD_TAG,
CAN_DELETE_TAG,
CAN_ADD_IMAGE,
CAN_DELETE_IMAGE,
CAN_ADD_WHERE_TAG,
CAN_SEE_WHERE_TAG,
CAN_DELETE_WHERE_TAG,
//V300 New
"can_see_bank_routing_scheme",
"can_see_bank_routing_address",
"can_see_bank_account_routing_scheme",
"can_see_bank_account_routing_address",
"can_see_other_bank_routing_scheme",
"can_see_other_bank_routing_address",
"can_see_other_account_routing_scheme",
"can_see_other_account_routing_address",
CAN_SEE_BANK_ROUTING_SCHEME,
CAN_SEE_BANK_ROUTING_ADDRESS,
CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,
CAN_SEE_OTHER_BANK_ROUTING_SCHEME,
CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,
CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS,
//v310
"can_query_available_funds",
"can_add_transaction_request_to_own_account",
"can_add_transaction_request_to_any_account",
"can_see_bank_account_credit_limit",
CAN_QUERY_AVAILABLE_FUNDS,
CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT,
CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT,
CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT,
//v400
"can_create_direct_debit",
"can_create_standing_order",
CAN_CREATE_DIRECT_DEBIT,
CAN_CREATE_STANDING_ORDER,
//payments
"can_add_transaction_request_to_any_account"
CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT
)
)
lazy val createSystemViewJsonV300 = createViewJsonV300.copy(name = "test", metadata_view = "test", is_public = false)
lazy val allowedActionsV500 = List(
"can_see_transaction_this_bank_account",
"can_see_transaction_other_bank_account",
"can_see_transaction_metadata",
"can_see_transaction_label",
"can_see_transaction_amount",
"can_see_transaction_type",
"can_see_transaction_currency",
"can_see_transaction_start_date",
"can_see_transaction_finish_date",
"can_see_transaction_balance",
"can_see_comments",
"can_see_narrative", "can_see_tags",
"can_see_images",
"can_see_bank_account_owners",
"can_see_bank_account_type",
"can_see_bank_account_balance",
"can_see_bank_account_currency",
"can_see_bank_account_label",
"can_see_bank_account_national_identifier",
"can_see_bank_account_swift_bic",
"can_see_bank_account_iban",
"can_see_bank_account_number",
"can_see_bank_account_bank_name",
"can_see_other_account_national_identifier",
"can_see_other_account_swift_bic",
"can_see_other_account_iban",
"can_see_other_account_bank_name",
"can_see_other_account_number",
"can_see_other_account_metadata",
"can_see_other_account_kind",
"can_see_more_info",
"can_see_url",
"can_see_image_url",
"can_see_open_corporates_url",
"can_see_corporate_location",
"can_see_physical_location",
"can_see_public_alias",
"can_see_private_alias",
"can_add_more_info",
"can_add_url",
"can_add_image_url",
"can_add_open_corporates_url",
"can_add_corporate_location",
"can_add_physical_location",
"can_add_public_alias",
"can_add_private_alias",
"can_delete_corporate_location",
"can_delete_physical_location",
"can_edit_narrative",
"can_add_comment",
"can_delete_comment",
"can_add_tag",
"can_delete_tag",
"can_add_image",
"can_delete_image",
"can_add_where_tag",
"can_see_where_tag",
"can_delete_where_tag",
"can_create_counterparty",
CAN_EDIT_OWNER_COMMENT,
CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_METADATA,
CAN_SEE_TRANSACTION_AMOUNT,
CAN_SEE_TRANSACTION_TYPE,
CAN_SEE_TRANSACTION_CURRENCY,
CAN_SEE_TRANSACTION_START_DATE,
CAN_SEE_TRANSACTION_FINISH_DATE,
CAN_SEE_TRANSACTION_BALANCE,
CAN_SEE_COMMENTS,
CAN_SEE_TAGS,
CAN_SEE_IMAGES,
CAN_SEE_BANK_ACCOUNT_OWNERS,
CAN_SEE_BANK_ACCOUNT_TYPE,
CAN_SEE_BANK_ACCOUNT_BALANCE,
CAN_SEE_BANK_ACCOUNT_CURRENCY,
CAN_SEE_BANK_ACCOUNT_LABEL,
CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,
CAN_SEE_BANK_ACCOUNT_IBAN,
CAN_SEE_BANK_ACCOUNT_NUMBER,
CAN_SEE_BANK_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,
CAN_SEE_OTHER_ACCOUNT_IBAN,
CAN_SEE_OTHER_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NUMBER,
CAN_SEE_OTHER_ACCOUNT_METADATA,
CAN_SEE_OTHER_ACCOUNT_KIND,
CAN_SEE_MORE_INFO,
CAN_SEE_URL,
CAN_SEE_IMAGE_URL,
CAN_SEE_OPEN_CORPORATES_URL,
CAN_SEE_CORPORATE_LOCATION,
CAN_SEE_PHYSICAL_LOCATION,
CAN_SEE_PUBLIC_ALIAS,
CAN_SEE_PRIVATE_ALIAS,
CAN_ADD_MORE_INFO,
CAN_ADD_URL,
CAN_ADD_IMAGE_URL,
CAN_ADD_OPEN_CORPORATES_URL,
CAN_ADD_CORPORATE_LOCATION,
CAN_ADD_PHYSICAL_LOCATION,
CAN_ADD_PUBLIC_ALIAS,
CAN_ADD_PRIVATE_ALIAS,
CAN_DELETE_CORPORATE_LOCATION,
CAN_DELETE_PHYSICAL_LOCATION,
CAN_ADD_COMMENT,
CAN_DELETE_COMMENT,
CAN_ADD_TAG,
CAN_DELETE_TAG,
CAN_ADD_IMAGE,
CAN_DELETE_IMAGE,
CAN_ADD_WHERE_TAG,
CAN_SEE_WHERE_TAG,
CAN_DELETE_WHERE_TAG,
//V300 New
"can_see_bank_routing_scheme",
"can_see_bank_routing_address",
"can_see_bank_account_routing_scheme",
"can_see_bank_account_routing_address",
"can_see_other_bank_routing_scheme",
"can_see_other_bank_routing_address",
"can_see_other_account_routing_scheme",
"can_see_other_account_routing_address",
CAN_SEE_BANK_ROUTING_SCHEME,
CAN_SEE_BANK_ROUTING_ADDRESS,
CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,
CAN_SEE_OTHER_BANK_ROUTING_SCHEME,
CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,
CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS,
//v310
"can_query_available_funds",
"can_add_transaction_request_to_own_account",
"can_add_transaction_request_to_any_account",
"can_see_bank_account_credit_limit",
CAN_QUERY_AVAILABLE_FUNDS,
CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT,
CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT,
CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT,
//v400
"can_create_direct_debit",
"can_create_standing_order",
CAN_CREATE_DIRECT_DEBIT,
CAN_CREATE_STANDING_ORDER,
//payments
"can_add_transaction_request_to_any_account",
CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT,
"can_see_transaction_request_types",
"can_see_transaction_requests",
"can_see_available_views_for_bank_account",
"can_update_bank_account_label",
"can_create_custom_view",
"can_delete_custom_view",
"can_update_custom_view",
"can_see_views_with_permissions_for_one_user",
"can_see_views_with_permissions_for_all_users",
"can_grant_access_to_custom_views",
"can_revoke_access_to_custom_views",
"can_see_transaction_status"
CAN_SEE_TRANSACTION_REQUEST_TYPES,
CAN_SEE_TRANSACTION_REQUESTS,
CAN_SEE_AVAILABLE_VIEWS_FOR_BANK_ACCOUNT,
CAN_UPDATE_BANK_ACCOUNT_LABEL,
CAN_CREATE_CUSTOM_VIEW,
CAN_DELETE_CUSTOM_VIEW,
CAN_UPDATE_CUSTOM_VIEW,
CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER,
CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS,
CAN_GRANT_ACCESS_TO_CUSTOM_VIEWS,
CAN_REVOKE_ACCESS_TO_CUSTOM_VIEWS,
CAN_SEE_TRANSACTION_STATUS
)
lazy val createCustomViewJson = CreateCustomViewJson(
@ -367,76 +361,76 @@ object SwaggerDefinitionsJSON {
which_alias_to_use = "family",
hide_metadata_if_alias_used = true,
allowed_actions = List(
"can_see_transaction_this_bank_account",
"can_see_transaction_other_bank_account",
"can_see_transaction_metadata",
"can_see_transaction_label",
"can_see_transaction_amount",
"can_see_transaction_type",
"can_see_transaction_currency",
"can_see_transaction_start_date",
"can_see_transaction_finish_date",
"can_see_transaction_balance",
"can_see_comments",
"can_see_narrative", "can_see_tags",
"can_see_images",
"can_see_bank_account_owners",
"can_see_bank_account_type",
"can_see_bank_account_balance",
"can_see_bank_account_currency",
"can_see_bank_account_label",
"can_see_bank_account_national_identifier",
"can_see_bank_account_swift_bic",
"can_see_bank_account_iban",
"can_see_bank_account_number",
"can_see_bank_account_bank_name",
"can_see_other_account_national_identifier",
"can_see_other_account_swift_bic",
"can_see_other_account_iban",
"can_see_other_account_bank_name",
"can_see_other_account_number",
"can_see_other_account_metadata",
"can_see_other_account_kind",
"can_see_more_info",
"can_see_url",
"can_see_image_url",
"can_see_open_corporates_url",
"can_see_corporate_location",
"can_see_physical_location",
"can_see_public_alias",
"can_see_private_alias",
"can_add_more_info",
"can_add_url",
"can_add_image_url",
"can_add_open_corporates_url",
"can_add_corporate_location",
"can_add_physical_location",
"can_add_public_alias",
"can_add_private_alias",
"can_delete_corporate_location",
"can_delete_physical_location",
"can_edit_narrative",
"can_add_comment",
"can_delete_comment",
"can_add_tag",
"can_delete_tag",
"can_add_image",
"can_delete_image",
"can_add_where_tag",
"can_see_where_tag",
"can_delete_where_tag",
"can_create_counterparty",
CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_METADATA,
CAN_SEE_TRANSACTION_AMOUNT,
CAN_SEE_TRANSACTION_TYPE,
CAN_SEE_TRANSACTION_CURRENCY,
CAN_SEE_TRANSACTION_START_DATE,
CAN_SEE_TRANSACTION_FINISH_DATE,
CAN_SEE_TRANSACTION_BALANCE,
CAN_SEE_COMMENTS,
CAN_SEE_TAGS,
CAN_SEE_IMAGES,
CAN_SEE_BANK_ACCOUNT_OWNERS,
CAN_SEE_BANK_ACCOUNT_TYPE,
CAN_SEE_BANK_ACCOUNT_BALANCE,
CAN_SEE_BANK_ACCOUNT_CURRENCY,
CAN_SEE_BANK_ACCOUNT_LABEL,
CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,
CAN_SEE_BANK_ACCOUNT_IBAN,
CAN_SEE_BANK_ACCOUNT_NUMBER,
CAN_SEE_BANK_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,
CAN_SEE_OTHER_ACCOUNT_IBAN,
CAN_SEE_OTHER_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NUMBER,
CAN_SEE_OTHER_ACCOUNT_METADATA,
CAN_SEE_OTHER_ACCOUNT_KIND,
CAN_SEE_MORE_INFO,
CAN_SEE_URL,
CAN_SEE_IMAGE_URL,
CAN_SEE_OPEN_CORPORATES_URL,
CAN_SEE_CORPORATE_LOCATION,
CAN_SEE_PHYSICAL_LOCATION,
CAN_SEE_PUBLIC_ALIAS,
CAN_SEE_PRIVATE_ALIAS,
CAN_ADD_MORE_INFO,
CAN_ADD_URL,
CAN_ADD_IMAGE_URL,
CAN_ADD_OPEN_CORPORATES_URL,
CAN_ADD_CORPORATE_LOCATION,
CAN_ADD_PHYSICAL_LOCATION,
CAN_ADD_PUBLIC_ALIAS,
CAN_ADD_PRIVATE_ALIAS,
CAN_DELETE_CORPORATE_LOCATION,
CAN_DELETE_PHYSICAL_LOCATION,
CAN_ADD_COMMENT,
CAN_DELETE_COMMENT,
CAN_ADD_TAG,
CAN_DELETE_TAG,
CAN_ADD_IMAGE,
CAN_DELETE_IMAGE,
CAN_ADD_WHERE_TAG,
CAN_SEE_WHERE_TAG,
CAN_DELETE_WHERE_TAG,
//V300 New
"can_see_bank_routing_scheme",
"can_see_bank_routing_address",
"can_see_bank_account_routing_scheme",
"can_see_bank_account_routing_address",
"can_see_other_bank_routing_scheme",
"can_see_other_bank_routing_address",
"can_see_other_account_routing_scheme",
"can_see_other_account_routing_address",
CAN_SEE_BANK_ROUTING_SCHEME,
CAN_SEE_BANK_ROUTING_ADDRESS,
CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,
CAN_SEE_OTHER_BANK_ROUTING_SCHEME,
CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,
CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS,
//v310
"can_query_available_funds"
CAN_QUERY_AVAILABLE_FUNDS
)
)
lazy val updateSystemViewJson310 = updateViewJsonV300.copy(is_public = false, is_firehose = Some(false))
@ -845,75 +839,72 @@ object SwaggerDefinitionsJSON {
which_alias_to_use = "family",
hide_metadata_if_alias_used = false,
allowed_actions = List(
"can_see_transaction_this_bank_account",
"can_see_transaction_other_bank_account",
"can_see_transaction_metadata",
"can_see_transaction_label",
"can_see_transaction_amount",
"can_see_transaction_type",
"can_see_transaction_currency",
"can_see_transaction_start_date",
"can_see_transaction_finish_date",
"can_see_transaction_balance",
"can_see_comments",
"can_see_narrative",
"can_see_tags",
"can_see_images",
"can_see_bank_account_owners",
"can_see_bank_account_type",
"can_see_bank_account_balance",
"can_see_bank_account_currency",
"can_see_bank_account_label",
"can_see_bank_account_national_identifier",
"can_see_bank_account_swift_bic",
"can_see_bank_account_iban",
"can_see_bank_account_number",
"can_see_bank_account_bank_name",
"can_see_other_account_national_identifier",
"can_see_other_account_swift_bic",
"can_see_other_account_iban",
"can_see_other_account_bank_name",
"can_see_other_account_number",
"can_see_other_account_metadata",
"can_see_other_account_kind",
"can_see_more_info",
"can_see_url",
"can_see_image_url",
"can_see_open_corporates_url",
"can_see_corporate_location",
"can_see_physical_location",
"can_see_public_alias",
"can_see_private_alias",
"can_add_more_info",
"can_add_url",
"can_add_image_url",
"can_add_open_corporates_url",
"can_add_corporate_location",
"can_add_physical_location",
"can_add_public_alias",
"can_add_private_alias",
"can_delete_corporate_location",
"can_delete_physical_location",
"can_edit_narrative",
"can_add_comment",
"can_delete_comment",
"can_add_tag",
"can_delete_tag",
"can_add_image",
"can_delete_image",
"can_add_where_tag",
"can_see_where_tag",
"can_delete_where_tag",
"can_create_counterparty",
CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_METADATA,
CAN_SEE_TRANSACTION_AMOUNT,
CAN_SEE_TRANSACTION_TYPE,
CAN_SEE_TRANSACTION_CURRENCY,
CAN_SEE_TRANSACTION_START_DATE,
CAN_SEE_TRANSACTION_FINISH_DATE,
CAN_SEE_TRANSACTION_BALANCE,
CAN_SEE_COMMENTS,
CAN_SEE_TAGS,
CAN_SEE_IMAGES,
CAN_SEE_BANK_ACCOUNT_OWNERS,
CAN_SEE_BANK_ACCOUNT_TYPE,
CAN_SEE_BANK_ACCOUNT_BALANCE,
CAN_SEE_BANK_ACCOUNT_CURRENCY,
CAN_SEE_BANK_ACCOUNT_LABEL,
CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,
CAN_SEE_BANK_ACCOUNT_IBAN,
CAN_SEE_BANK_ACCOUNT_NUMBER,
CAN_SEE_BANK_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,
CAN_SEE_OTHER_ACCOUNT_IBAN,
CAN_SEE_OTHER_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NUMBER,
CAN_SEE_OTHER_ACCOUNT_METADATA,
CAN_SEE_OTHER_ACCOUNT_KIND,
CAN_SEE_MORE_INFO,
CAN_SEE_URL,
CAN_SEE_IMAGE_URL,
CAN_SEE_OPEN_CORPORATES_URL,
CAN_SEE_CORPORATE_LOCATION,
CAN_SEE_PHYSICAL_LOCATION,
CAN_SEE_PUBLIC_ALIAS,
CAN_SEE_PRIVATE_ALIAS,
CAN_ADD_MORE_INFO,
CAN_ADD_URL,
CAN_ADD_IMAGE_URL,
CAN_ADD_OPEN_CORPORATES_URL,
CAN_ADD_CORPORATE_LOCATION,
CAN_ADD_PHYSICAL_LOCATION,
CAN_ADD_PUBLIC_ALIAS,
CAN_ADD_PRIVATE_ALIAS,
CAN_DELETE_CORPORATE_LOCATION,
CAN_DELETE_PHYSICAL_LOCATION,
CAN_ADD_COMMENT,
CAN_DELETE_COMMENT,
CAN_ADD_TAG,
CAN_DELETE_TAG,
CAN_ADD_IMAGE,
CAN_DELETE_IMAGE,
CAN_ADD_WHERE_TAG,
CAN_SEE_WHERE_TAG,
CAN_DELETE_WHERE_TAG,
//V300 New
"can_see_bank_routing_scheme",
"can_see_bank_routing_address",
"can_see_bank_account_routing_scheme",
"can_see_bank_account_routing_address",
"can_see_other_bank_routing_scheme",
"can_see_other_bank_routing_address",
"can_see_other_account_routing_scheme",
"can_see_other_account_routing_address"
CAN_SEE_BANK_ROUTING_SCHEME,
CAN_SEE_BANK_ROUTING_ADDRESS,
CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,
CAN_SEE_OTHER_BANK_ROUTING_SCHEME,
CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,
CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS
)
)
@ -923,75 +914,72 @@ object SwaggerDefinitionsJSON {
which_alias_to_use = "family",
hide_metadata_if_alias_used = false,
allowed_actions = List(
"can_see_transaction_this_bank_account",
"can_see_transaction_other_bank_account",
"can_see_transaction_metadata",
"can_see_transaction_label",
"can_see_transaction_amount",
"can_see_transaction_type",
"can_see_transaction_currency",
"can_see_transaction_start_date",
"can_see_transaction_finish_date",
"can_see_transaction_balance",
"can_see_comments",
"can_see_narrative",
"can_see_tags",
"can_see_images",
"can_see_bank_account_owners",
"can_see_bank_account_type",
"can_see_bank_account_balance",
"can_see_bank_account_currency",
"can_see_bank_account_label",
"can_see_bank_account_national_identifier",
"can_see_bank_account_swift_bic",
"can_see_bank_account_iban",
"can_see_bank_account_number",
"can_see_bank_account_bank_name",
"can_see_other_account_national_identifier",
"can_see_other_account_swift_bic",
"can_see_other_account_iban",
"can_see_other_account_bank_name",
"can_see_other_account_number",
"can_see_other_account_metadata",
"can_see_other_account_kind",
"can_see_more_info",
"can_see_url",
"can_see_image_url",
"can_see_open_corporates_url",
"can_see_corporate_location",
"can_see_physical_location",
"can_see_public_alias",
"can_see_private_alias",
"can_add_more_info",
"can_add_url",
"can_add_image_url",
"can_add_open_corporates_url",
"can_add_corporate_location",
"can_add_physical_location",
"can_add_public_alias",
"can_add_private_alias",
"can_delete_corporate_location",
"can_delete_physical_location",
"can_edit_narrative",
"can_add_comment",
"can_delete_comment",
"can_add_tag",
"can_delete_tag",
"can_add_image",
"can_delete_image",
"can_add_where_tag",
"can_see_where_tag",
"can_delete_where_tag",
"can_create_counterparty",
CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_METADATA,
CAN_SEE_TRANSACTION_AMOUNT,
CAN_SEE_TRANSACTION_TYPE,
CAN_SEE_TRANSACTION_CURRENCY,
CAN_SEE_TRANSACTION_START_DATE,
CAN_SEE_TRANSACTION_FINISH_DATE,
CAN_SEE_TRANSACTION_BALANCE,
CAN_SEE_COMMENTS,
CAN_SEE_TAGS,
CAN_SEE_IMAGES,
CAN_SEE_BANK_ACCOUNT_OWNERS,
CAN_SEE_BANK_ACCOUNT_TYPE,
CAN_SEE_BANK_ACCOUNT_BALANCE,
CAN_SEE_BANK_ACCOUNT_CURRENCY,
CAN_SEE_BANK_ACCOUNT_LABEL,
CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,
CAN_SEE_BANK_ACCOUNT_IBAN,
CAN_SEE_BANK_ACCOUNT_NUMBER,
CAN_SEE_BANK_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,
CAN_SEE_OTHER_ACCOUNT_IBAN,
CAN_SEE_OTHER_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NUMBER,
CAN_SEE_OTHER_ACCOUNT_METADATA,
CAN_SEE_OTHER_ACCOUNT_KIND,
CAN_SEE_MORE_INFO,
CAN_SEE_URL,
CAN_SEE_IMAGE_URL,
CAN_SEE_OPEN_CORPORATES_URL,
CAN_SEE_CORPORATE_LOCATION,
CAN_SEE_PHYSICAL_LOCATION,
CAN_SEE_PUBLIC_ALIAS,
CAN_SEE_PRIVATE_ALIAS,
CAN_ADD_MORE_INFO,
CAN_ADD_URL,
CAN_ADD_IMAGE_URL,
CAN_ADD_OPEN_CORPORATES_URL,
CAN_ADD_CORPORATE_LOCATION,
CAN_ADD_PHYSICAL_LOCATION,
CAN_ADD_PUBLIC_ALIAS,
CAN_ADD_PRIVATE_ALIAS,
CAN_DELETE_CORPORATE_LOCATION,
CAN_DELETE_PHYSICAL_LOCATION,
CAN_ADD_COMMENT,
CAN_DELETE_COMMENT,
CAN_ADD_TAG,
CAN_DELETE_TAG,
CAN_ADD_IMAGE,
CAN_DELETE_IMAGE,
CAN_ADD_WHERE_TAG,
CAN_SEE_WHERE_TAG,
CAN_DELETE_WHERE_TAG,
//V300 New
"can_see_bank_routing_scheme",
"can_see_bank_routing_address",
"can_see_bank_account_routing_scheme",
"can_see_bank_account_routing_address",
"can_see_other_bank_routing_scheme",
"can_see_other_bank_routing_address",
"can_see_other_account_routing_scheme",
"can_see_other_account_routing_address"
CAN_SEE_BANK_ROUTING_SCHEME,
CAN_SEE_BANK_ROUTING_ADDRESS,
CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,
CAN_SEE_OTHER_BANK_ROUTING_SCHEME,
CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,
CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,
CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS
)
)
lazy val viewsJSONV121 = ViewsJSONV121(

View File

@ -5054,7 +5054,6 @@ object APIUtil extends MdcLoggable with CustomJsonFormats{
}
//get all the permission Pair from one record, eg:
//List("can_see_transaction_this_bank_account","can_see_transaction_requests"....)
//Note, do not contain can_revoke_access_to_views and can_grant_access_to_views permission yet.
def getViewPermissions(view: ViewDefinition) = view.allFields.map(x => (x.name, x.get))
.filter(pair =>pair._2.isInstanceOf[Boolean])

View File

@ -2,6 +2,7 @@ package code.api.util
import code.api.Constant
import code.api.Constant._
import code.api.util.APIUtil.{DateWithMs, DateWithMsExampleString, formatDate, oneYearAgoDate, parseDate}
import code.api.util.ErrorMessages.{InvalidJsonFormat, UnknownError, UserHasMissingRoles, UserNotLoggedIn}
import code.api.util.Glossary.{glossaryItems, makeGlossaryItem}
@ -709,7 +710,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("count", countExample)
lazy val canSeeOtherAccountBankNameExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_bank_name", canSeeOtherAccountBankNameExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_BANK_NAME, canSeeOtherAccountBankNameExample)
lazy val handleExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("handle", handleExample)
@ -730,7 +731,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("duration", durationExample)
lazy val canSeeBankAccountTypeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_type", canSeeBankAccountTypeExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_TYPE, canSeeBankAccountTypeExample)
lazy val toSepaExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("to_sepa", toSepaExample)
@ -739,7 +740,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("which_alias_to_use", whichAliasToUseExample)
lazy val canAddImageExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_image", canAddImageExample)
glossaryItems += makeGlossaryItem(CAN_ADD_IMAGE, canAddImageExample)
lazy val accountAttributeIdExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("account_attribute_id", accountAttributeIdExample)
@ -758,18 +759,18 @@ object ExampleValue {
lazy val statusExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("status", statusExample)
lazy val transactionStatusExample = ConnectorField(s" ${TransactionRequestStatus.COMPLETED.toString}",s"Status of the transaction, e.g. ${TransactionRequestStatus.COMPLETED.toString}, ${TransactionRequestStatus.PENDING.toString} ..")
glossaryItems += makeGlossaryItem("status", transactionStatusExample)
lazy val errorCodeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("errorCode", errorCodeExample)
lazy val textExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("text", textExample)
lazy val canSeeTransactionBalanceExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_balance", canSeeTransactionBalanceExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_BALANCE, canSeeTransactionBalanceExample)
lazy val atmsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("atms", atmsExample)
@ -778,10 +779,10 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("overall_balance_date", overallBalanceDateExample)
lazy val canDeletePhysicalLocationExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_delete_physical_location", canDeletePhysicalLocationExample)
glossaryItems += makeGlossaryItem(CAN_DELETE_PHYSICAL_LOCATION, canDeletePhysicalLocationExample)
lazy val canAddWhereTagExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_where_tag", canAddWhereTagExample)
glossaryItems += makeGlossaryItem(CAN_ADD_WHERE_TAG, canAddWhereTagExample)
lazy val pinResetExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("pin_reset", pinResetExample)
@ -811,10 +812,10 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("active", activeExample)
lazy val canSeeOtherAccountMetadataExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_metadata", canSeeOtherAccountMetadataExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_METADATA, canSeeOtherAccountMetadataExample)
lazy val canSeeBankAccountIbanExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_iban", canSeeBankAccountIbanExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_IBAN, canSeeBankAccountIbanExample)
lazy val lobbyExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("lobby", lobbyExample)
@ -844,7 +845,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("function_name", functionNameExample)
lazy val canSeeBankRoutingSchemeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_routing_scheme", canSeeBankRoutingSchemeExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ROUTING_SCHEME, canSeeBankRoutingSchemeExample)
lazy val line1Example = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("line1", line1Example)
@ -865,7 +866,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("counterparties", counterpartiesExample)
lazy val canSeeMoreInfoExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_more_info", canSeeMoreInfoExample)
glossaryItems += makeGlossaryItem(CAN_SEE_MORE_INFO, canSeeMoreInfoExample)
lazy val transactionAttributesExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("transaction_attributes", transactionAttributesExample)
@ -883,31 +884,31 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("images", imagesExample)
lazy val canSeeBankAccountBalanceExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_balance", canSeeBankAccountBalanceExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_BALANCE, canSeeBankAccountBalanceExample)
lazy val parametersExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("parameters", parametersExample)
lazy val canAddTransactionRequestToAnyAccountExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_transaction_request_to_any_account", canAddTransactionRequestToAnyAccountExample)
glossaryItems += makeGlossaryItem(CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT, canAddTransactionRequestToAnyAccountExample)
lazy val websiteExample = ConnectorField("www.openbankproject.com",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("website", websiteExample)
lazy val atmIdExample = ConnectorField("atme-9a0f-4bfa-b30b-9003aa467f51","A string that MUST uniquely identify the ATM on this OBP instance.")
glossaryItems += makeGlossaryItem("atm_id", atmIdExample)
lazy val atmAttributeIdExample = ConnectorField("xxaf2a-9a0f-4bfa-b30b-9003aa467f51","A string that MUST uniquely identify the ATM Attribute on this OBP instance.")
glossaryItems += makeGlossaryItem("ATM.attribute_id", atmIdExample)
lazy val entityIdExample = ConnectorField("0af807d7-3c39-43ef-9712-82bcfde1b9ca", "A unique identifier for the entity.")
glossaryItems += makeGlossaryItem("entity_id", entityIdExample)
lazy val certificateAuthorityCaOwnerIdExample = ConnectorField("CY_CBC", "The certificate authority owner ID.")
glossaryItems += makeGlossaryItem("certificate_authority_ca_owner_id", certificateAuthorityCaOwnerIdExample)
lazy val entityCertificatePublicKeyExample = ConnectorField(
"MIICsjCCAZqgAwIBAgIGAYwQ62R0MA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbT" +
"MIICsjCCAZqgAwIBAgIGAYwQ62R0MA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbT" +
"AeFw0yMzExMjcxMzE1MTFaFw0yNTExMjYxMzE1MTFaMBoxGDAWBgNVBAMMD2FwcC5leGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADC" +
"CAQoCggEBAK9WIodZHWzKyCcf9YfWEhPURbfO6zKuMqzHN27GdqHsVVEGxP4F/J4mso+0ENcRr6ur4u81iREaVdCc40rHDHVJNEtniD8Icbz7tcsq" +
"AewIVhc/q6WXGqImJpCq7hA0m247dDsaZT0lb/MVBiMoJxDEmAE/GYYnWTEn84R35WhJsMvuQ7QmLvNg6RkChY6POCT/YKe9NKwa1NqI1U+oA5RFz" +
@ -919,34 +920,34 @@ object ExampleValue {
"The public key of the entity certificate."
)
glossaryItems += makeGlossaryItem("entity_certificate_public_key", entityCertificatePublicKeyExample)
lazy val entityNameExample = ConnectorField("EXAMPLE COMPANY LTD", "The name of the entity.")
glossaryItems += makeGlossaryItem("entity_name", entityNameExample)
lazy val entityCodeExample = ConnectorField("PSD_PICY_CBC!12345", "The code of the entity.")
glossaryItems += makeGlossaryItem("entity_code", entityCodeExample)
lazy val entityTypeExample = ConnectorField("PSD_PI", "The type of the entity.")
glossaryItems += makeGlossaryItem("entity_type", entityTypeExample)
lazy val entityAddressExample = ConnectorField("EXAMPLE COMPANY LTD, 5 SOME STREET", "The address of the entity.")
glossaryItems += makeGlossaryItem("entity_address", entityAddressExample)
lazy val entityTownCityExample = ConnectorField("SOME CITY", "The town or city of the entity.")
glossaryItems += makeGlossaryItem("entity_town_city", entityTownCityExample)
lazy val entityPostCodeExample = ConnectorField("1060", "The postal code of the entity.")
glossaryItems += makeGlossaryItem("entity_post_code", entityPostCodeExample)
lazy val entityCountryExample = ConnectorField("CY", "The country of the entity.")
glossaryItems += makeGlossaryItem("entity_country", entityCountryExample)
lazy val entityWebSiteExample = ConnectorField("www.example.com", "The website of the entity.")
glossaryItems += makeGlossaryItem("entity_web_site", entityWebSiteExample)
lazy val servicesExample = ConnectorField("""[{"CY":["PS_010","PS_020","PS_03C","PS_04C"]}]""", "The services provided by the entity.")
glossaryItems += makeGlossaryItem("services", servicesExample)
lazy val regulatedEntityAttributeIdExample = ConnectorField("attrafa-9a0f-4bfa-b30b-9003aa467f51","A string that MUST uniquely identify the Regulated Entity Attribute on this OBP instance.")
glossaryItems += makeGlossaryItem("RegulatedEntity.attribute_id", regulatedEntityAttributeIdExample)
@ -1005,13 +1006,13 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("accessibility_features", accessibilityFeaturesExample)
lazy val canSeeOtherBankRoutingSchemeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_bank_routing_scheme", canSeeOtherBankRoutingSchemeExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_BANK_ROUTING_SCHEME, canSeeOtherBankRoutingSchemeExample)
lazy val physicalLocationExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("physical_location", physicalLocationExample)
lazy val canSeeBankAccountRoutingSchemeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_routing_scheme", canSeeBankAccountRoutingSchemeExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME, canSeeBankAccountRoutingSchemeExample)
lazy val rankAmount2Example = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("rank_amount2", rankAmount2Example)
@ -1026,7 +1027,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("image_url", imageUrlExample)
lazy val canSeeTransactionMetadataExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_metadata", canSeeTransactionMetadataExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_METADATA, canSeeTransactionMetadataExample)
lazy val documentsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("documents", documentsExample)
@ -1056,13 +1057,13 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("other_accounts", otherAccountsExample)
lazy val canSeeTransactionFinishDateExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_finish_date", canSeeTransactionFinishDateExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_FINISH_DATE, canSeeTransactionFinishDateExample)
lazy val satisfiedExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("satisfied", satisfiedExample)
lazy val canSeeOtherAccountIbanExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_iban", canSeeOtherAccountIbanExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_IBAN, canSeeOtherAccountIbanExample)
lazy val attributeIdExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("attribute_id", attributeIdExample)
@ -1074,7 +1075,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("id", idExample)
lazy val canAddCorporateLocationExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_corporate_location", canAddCorporateLocationExample)
glossaryItems += makeGlossaryItem(CAN_ADD_CORPORATE_LOCATION, canAddCorporateLocationExample)
lazy val crmEventsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("crm_events", crmEventsExample)
@ -1107,7 +1108,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("requested_current_valid_end_date", requestedCurrentValidEndDateExample)
lazy val canSeeOtherBankRoutingAddressExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_bank_routing_address", canSeeOtherBankRoutingAddressExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_BANK_ROUTING_ADDRESS, canSeeOtherBankRoutingAddressExample)
lazy val thursdayExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("thursday", thursdayExample)
@ -1117,27 +1118,27 @@ object ExampleValue {
lazy val phoneExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("phone", phoneExample)
lazy val sepaCreditTransferExample = ConnectorField("yes","no-description-provided")
glossaryItems += makeGlossaryItem("sepaCreditTransfer", sepaCreditTransferExample)
glossaryItems += makeGlossaryItem("sepaCreditTransfer", sepaCreditTransferExample)
lazy val sepaSddCoreExample = ConnectorField("yes","no-description-provided")
glossaryItems += makeGlossaryItem("sepaSddCore", sepaSddCoreExample)
glossaryItems += makeGlossaryItem("sepaSddCore", sepaSddCoreExample)
lazy val sepaB2bExample = ConnectorField("yes","no-description-provided")
glossaryItems += makeGlossaryItem("sepaB2b", sepaB2bExample)
glossaryItems += makeGlossaryItem("sepaB2b", sepaB2bExample)
lazy val sepaCardClearingExample = ConnectorField("no","no-description-provided")
glossaryItems += makeGlossaryItem("sepaCardClearing", sepaCardClearingExample)
glossaryItems += makeGlossaryItem("sepaCardClearing", sepaCardClearingExample)
lazy val bicExample = ConnectorField("BUKBGB22","The Business Identifier Code")
glossaryItems += makeGlossaryItem("bic", bicExample)
glossaryItems += makeGlossaryItem("bic", bicExample)
lazy val sepaDirectDebitExample = ConnectorField("yes","no-description-provided")
glossaryItems += makeGlossaryItem("sepaDirectDebit", sepaDirectDebitExample)
lazy val canSeeTransactionOtherBankAccountExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_other_bank_account", canSeeTransactionOtherBankAccountExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT, canSeeTransactionOtherBankAccountExample)
lazy val itemsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("items", itemsExample)
@ -1149,7 +1150,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("bank_routings", bankRoutingsExample)
lazy val canSeeOpenCorporatesUrlExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_open_corporates_url", canSeeOpenCorporatesUrlExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OPEN_CORPORATES_URL, canSeeOpenCorporatesUrlExample)
lazy val branchesExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("branches", branchesExample)
@ -1233,7 +1234,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("comment_id", commentIdExample)
lazy val canSeeBankAccountNationalIdentifierExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_national_identifier", canSeeBankAccountNationalIdentifierExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER, canSeeBankAccountNationalIdentifierExample)
lazy val perMinuteExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("per_minute", perMinuteExample)
@ -1266,7 +1267,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("this_view_id", thisViewIdExample)
lazy val canSeeTransactionCurrencyExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_currency", canSeeTransactionCurrencyExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_CURRENCY, canSeeTransactionCurrencyExample)
lazy val accountOtpExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("account_otp", accountOtpExample)
@ -1275,7 +1276,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("hide_metadata_if_alias_used", hideMetadataIfAliasUsedExample)
lazy val canSeeBankAccountCurrencyExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_currency", canSeeBankAccountCurrencyExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_CURRENCY, canSeeBankAccountCurrencyExample)
lazy val generateAuditorsViewExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("generate_auditors_view", generateAuditorsViewExample)
@ -1324,16 +1325,16 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("from_person", fromPersonExample)
lazy val canSeePrivateAliasExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_private_alias", canSeePrivateAliasExample)
glossaryItems += makeGlossaryItem(CAN_SEE_PRIVATE_ALIAS, canSeePrivateAliasExample)
lazy val typeOfLockExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("type_of_lock", typeOfLockExample)
lazy val canSeeOtherAccountKindExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_kind", canSeeOtherAccountKindExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_KIND, canSeeOtherAccountKindExample)
lazy val canAddOpenCorporatesUrlExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_open_corporates_url", canAddOpenCorporatesUrlExample)
glossaryItems += makeGlossaryItem(CAN_ADD_OPEN_CORPORATES_URL, canAddOpenCorporatesUrlExample)
lazy val metadataViewExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("metadata_view", metadataViewExample)
@ -1342,7 +1343,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("alias", aliasExample)
lazy val canSeeTransactionThisBankAccountExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_this_bank_account", canSeeTransactionThisBankAccountExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT, canSeeTransactionThisBankAccountExample)
lazy val triggerNameExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("trigger_name", triggerNameExample)
@ -1375,7 +1376,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("address", addressExample)
lazy val canAddPrivateAliasExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_private_alias", canAddPrivateAliasExample)
glossaryItems += makeGlossaryItem(CAN_ADD_PRIVATE_ALIAS, canAddPrivateAliasExample)
lazy val postcodeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("postcode", postcodeExample)
@ -1396,7 +1397,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("reset_password_url", resetPasswordUrlExample)
lazy val canSeeBankAccountSwiftBicExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_swift_bic", canSeeBankAccountSwiftBicExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_SWIFT_BIC, canSeeBankAccountSwiftBicExample)
lazy val jsonstringExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("jsonstring", jsonstringExample)
@ -1417,10 +1418,10 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("details", detailsExample)
lazy val canSeeOwnerCommentExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_owner_comment", canSeeOwnerCommentExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OWNER_COMMENT, canSeeOwnerCommentExample)
lazy val canSeeTagsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_tags", canSeeTagsExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TAGS, canSeeTagsExample)
lazy val moreInfoUrlExample = ConnectorField("www.example.com/abc",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("more_info_url", moreInfoUrlExample)
@ -1441,7 +1442,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("terms_and_conditions_url_example", termsAndConditionsUrlExample)
lazy val canAddUrlExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_url", canAddUrlExample)
glossaryItems += makeGlossaryItem(CAN_ADD_URL, canAddUrlExample)
lazy val viewExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("view", viewExample)
@ -1450,7 +1451,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("display_name", displayNameExample)
lazy val canDeleteTagExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_delete_tag", canDeleteTagExample)
glossaryItems += makeGlossaryItem(CAN_DELETE_TAG, canDeleteTagExample)
lazy val hoursExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("hours", hoursExample)
@ -1513,7 +1514,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("kyc_document_id", kycDocumentIdExample)
lazy val canSeePublicAliasExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_public_alias", canSeePublicAliasExample)
glossaryItems += makeGlossaryItem(CAN_SEE_PUBLIC_ALIAS, canSeePublicAliasExample)
lazy val webUiPropsIdExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("web_ui_props_id", webUiPropsIdExample)
@ -1522,7 +1523,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("provider", providerExample)
lazy val canSeePhysicalLocationExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_physical_location", canSeePhysicalLocationExample)
glossaryItems += makeGlossaryItem(CAN_SEE_PHYSICAL_LOCATION, canSeePhysicalLocationExample)
lazy val accountRoutingsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("account_routings", accountRoutingsExample)
@ -1944,7 +1945,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("full_name", fullNameExample)
lazy val canCreateDirectDebitExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_create_direct_debit", canCreateDirectDebitExample)
glossaryItems += makeGlossaryItem(CAN_CREATE_DIRECT_DEBIT, canCreateDirectDebitExample)
lazy val futureDateExample = ConnectorField("20200127",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("future_date", futureDateExample)
@ -1962,19 +1963,19 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("document_number", documentNumberExample)
lazy val canSeeOtherAccountNationalIdentifierExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_national_identifier", canSeeOtherAccountNationalIdentifierExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER, canSeeOtherAccountNationalIdentifierExample)
lazy val canSeeTransactionStartDateExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_start_date", canSeeTransactionStartDateExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_START_DATE, canSeeTransactionStartDateExample)
lazy val canAddPhysicalLocationExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_physical_location", canAddPhysicalLocationExample)
glossaryItems += makeGlossaryItem(CAN_ADD_PHYSICAL_LOCATION, canAddPhysicalLocationExample)
lazy val cacheExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("cache", cacheExample)
lazy val canSeeBankRoutingAddressExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_routing_address", canSeeBankRoutingAddressExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ROUTING_ADDRESS, canSeeBankRoutingAddressExample)
lazy val usersExample = ConnectorField("user list", "Please refer to the user object.")
glossaryItems += makeGlossaryItem("users", usersExample)
@ -2004,7 +2005,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("metadata", metadataExample)
lazy val canSeeTransactionAmountExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_amount", canSeeTransactionAmountExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_AMOUNT, canSeeTransactionAmountExample)
lazy val methodRoutingIdExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("method_routing_id", methodRoutingIdExample)
@ -2028,10 +2029,10 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("country_code", countryCodeExample)
lazy val canSeeBankAccountCreditLimitExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_credit_limit", canSeeBankAccountCreditLimitExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT, canSeeBankAccountCreditLimitExample)
lazy val canSeeOtherAccountNumberExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_number", canSeeOtherAccountNumberExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_NUMBER, canSeeOtherAccountNumberExample)
lazy val orderExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("order", orderExample)
@ -2052,7 +2053,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("is_active", isActiveExample)
lazy val canSeeBankAccountBankNameExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_bank_name", canSeeBankAccountBankNameExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_BANK_NAME, canSeeBankAccountBankNameExample)
lazy val firstNameExample = ConnectorField("Tom","The first name")
glossaryItems += makeGlossaryItem("first_name", firstNameExample)
@ -2067,7 +2068,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("transaction_ids", transactionIdsExample)
lazy val canSeeBankAccountOwnersExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_owners", canSeeBankAccountOwnersExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_OWNERS, canSeeBankAccountOwnersExample)
lazy val actualDateExample = ConnectorField("2020-01-27",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("actual_date", actualDateExample)
@ -2076,10 +2077,10 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("example_outbound_message", exampleOutboundMessageExample)
lazy val canDeleteWhereTagExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_delete_where_tag", canDeleteWhereTagExample)
glossaryItems += makeGlossaryItem(CAN_DELETE_WHERE_TAG, canDeleteWhereTagExample)
lazy val canSeeUrlExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_url", canSeeUrlExample)
glossaryItems += makeGlossaryItem(CAN_SEE_URL, canSeeUrlExample)
lazy val versionExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("version", versionExample)
@ -2088,7 +2089,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("collected", collectedExample)
lazy val canAddPublicAliasExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_public_alias", canAddPublicAliasExample)
glossaryItems += makeGlossaryItem(CAN_ADD_PUBLIC_ALIAS, canAddPublicAliasExample)
lazy val allowedActionsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("allowed_actions", allowedActionsExample)
@ -2106,7 +2107,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("implemented_in_version", implementedInVersionExample)
lazy val canSeeImageUrlExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_image_url", canSeeImageUrlExample)
glossaryItems += makeGlossaryItem(CAN_SEE_IMAGE_URL, canSeeImageUrlExample)
lazy val toTransferToPhoneExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("to_transfer_to_phone", toTransferToPhoneExample)
@ -2151,7 +2152,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("e", eExample)
lazy val canSeeCorporateLocationExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_corporate_location", canSeeCorporateLocationExample)
glossaryItems += makeGlossaryItem(CAN_SEE_CORPORATE_LOCATION, canSeeCorporateLocationExample)
lazy val userExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("user", userExample)
@ -2199,7 +2200,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("requiredfieldinfo", requiredfieldinfoExample)
lazy val canSeeWhereTagExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_where_tag", canSeeWhereTagExample)
glossaryItems += makeGlossaryItem(CAN_SEE_WHERE_TAG, canSeeWhereTagExample)
lazy val bankidExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("bankid", bankidExample)
@ -2262,10 +2263,10 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("to_sandbox_tan", toSandboxTanExample)
lazy val canAddTagExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_tag", canAddTagExample)
glossaryItems += makeGlossaryItem(CAN_ADD_TAG, canAddTagExample)
lazy val canSeeBankAccountLabelExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_label", canSeeBankAccountLabelExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_LABEL, canSeeBankAccountLabelExample)
lazy val serviceAvailableExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("service_available", serviceAvailableExample)
@ -2280,7 +2281,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("link", linkExample)
lazy val canSeeTransactionTypeExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_type", canSeeTransactionTypeExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_TYPE, canSeeTransactionTypeExample)
lazy val implementedByPartialFunctionExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("implemented_by_partial_function", implementedByPartialFunctionExample)
@ -2289,7 +2290,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("drive_up", driveUpExample)
lazy val canAddMoreInfoExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_more_info", canAddMoreInfoExample)
glossaryItems += makeGlossaryItem(CAN_ADD_MORE_INFO, canAddMoreInfoExample)
lazy val detailExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("detail", detailExample)
@ -2317,21 +2318,21 @@ object ExampleValue {
lazy val maxNumberOfYearlyTransactionsExample = ConnectorField("100",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("max_number_of_yearly_transactions", maxNumberOfYearlyTransactionsExample)
lazy val maxNumberOfTransactionsExample = ConnectorField("100",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("max_number_of_transactions", maxNumberOfTransactionsExample)
lazy val maxTotalAmountExample = ConnectorField("10000.12",NoDescriptionProvided)
glossaryItems += makeGlossaryItem("max_total_amount", maxTotalAmountExample)
lazy val canAddImageUrlExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_add_image_url", canAddImageUrlExample)
glossaryItems += makeGlossaryItem(CAN_ADD_IMAGE_URL, canAddImageUrlExample)
lazy val jwksUrisExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("jwks_uris", jwksUrisExample)
lazy val canSeeOtherAccountSwiftBicExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_other_account_swift_bic", canSeeOtherAccountSwiftBicExample)
glossaryItems += makeGlossaryItem(CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC, canSeeOtherAccountSwiftBicExample)
lazy val staffUserIdExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("staff_user_id", staffUserIdExample)
@ -2343,7 +2344,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("valid_from", validFromExample)
lazy val canDeleteImageExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_delete_image", canDeleteImageExample)
glossaryItems += makeGlossaryItem(CAN_DELETE_IMAGE, canDeleteImageExample)
lazy val toExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("to", toExample)
@ -2355,13 +2356,13 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("product_attributes", productAttributesExample)
lazy val canSeeTransactionDescriptionExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_transaction_description", canSeeTransactionDescriptionExample)
glossaryItems += makeGlossaryItem(CAN_SEE_TRANSACTION_DESCRIPTION, canSeeTransactionDescriptionExample)
lazy val faceImageExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("face_image", faceImageExample)
lazy val canSeeBankAccountNumberExample = ConnectorField(booleanFalse,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_see_bank_account_number", canSeeBankAccountNumberExample)
glossaryItems += makeGlossaryItem(CAN_SEE_BANK_ACCOUNT_NUMBER, canSeeBankAccountNumberExample)
lazy val glossaryItemsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("glossary_items", glossaryItemsExample)
@ -2391,8 +2392,8 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("DynamicResourceDoc.description", dynamicResourceDocDescriptionExample)
lazy val canDeleteCommentExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_delete_comment", canDeleteCommentExample)
glossaryItems += makeGlossaryItem(CAN_DELETE_COMMENT, canDeleteCommentExample)
lazy val commentsExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("comments", commentsExample)
@ -2400,7 +2401,7 @@ object ExampleValue {
glossaryItems += makeGlossaryItem("banks", banksExample)
lazy val canCreateStandingOrderExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("can_create_standing_order", canCreateStandingOrderExample)
glossaryItems += makeGlossaryItem(CAN_CREATE_STANDING_ORDER, canCreateStandingOrderExample)
lazy val adapterImplementationExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("adapter_implementation", adapterImplementationExample)

View File

@ -1,16 +1,13 @@
package code.api.util
import java.io.File
import code.api.Constant
import code.api.Constant.{PARAM_LOCALE, directLoginHeaderName}
import code.api.Constant._
import code.api.util.APIUtil.{getObpApiRoot, getServerUrl}
import code.api.util.ExampleValue.{accountIdExample, bankIdExample, customerIdExample, userIdExample}
import code.util.Helper.MdcLoggable
import code.util.HydraUtil
import code.webuiprops.MappedWebUiPropsProvider.getWebUiPropsValue
import net.liftweb.http.LiftRules
import java.io.File
import scala.collection.mutable.ArrayBuffer
@ -1336,7 +1333,7 @@ object Glossary extends MdcLoggable {
|
|Body:
|
| { "name":"_test", "description":"This view is for family", "metadata_view":"_test", "is_public":true, "which_alias_to_use":"family", "hide_metadata_if_alias_used":false, "allowed_actions":["can_see_transaction_this_bank_account","can_see_transaction_other_bank_account","can_see_transaction_metadata","can_see_transaction_label","can_see_transaction_amount","can_see_transaction_type","can_see_transaction_currency","can_see_transaction_start_date","can_see_transaction_finish_date","can_see_transaction_balance","can_see_comments","can_see_narrative","can_see_tags","can_see_images","can_see_bank_account_owners","can_see_bank_account_type","can_see_bank_account_balance","can_see_bank_account_currency","can_see_bank_account_label","can_see_bank_account_national_identifier","can_see_bank_account_swift_bic","can_see_bank_account_iban","can_see_bank_account_number","can_see_bank_account_bank_name","can_see_other_account_national_identifier","can_see_other_account_swift_bic","can_see_other_account_iban","can_see_other_account_bank_name","can_see_other_account_number","can_see_other_account_metadata","can_see_other_account_kind","can_see_more_info","can_see_url","can_see_image_url","can_see_open_corporates_url","can_see_corporate_location","can_see_physical_location","can_see_public_alias","can_see_private_alias","can_add_more_info","can_add_url","can_add_image_url","can_add_open_corporates_url","can_add_corporate_location","can_add_physical_location","can_add_public_alias","can_add_private_alias","can_delete_corporate_location","can_delete_physical_location","can_edit_narrative","can_add_comment","can_delete_comment","can_add_tag","can_delete_tag","can_add_image","can_delete_image","can_add_where_tag","can_see_where_tag","can_delete_where_tag","can_create_counterparty","can_see_bank_routing_scheme","can_see_bank_routing_address","can_see_bank_account_routing_scheme","can_see_bank_account_routing_address","can_see_other_bank_routing_scheme","can_see_other_bank_routing_address","can_see_other_account_routing_scheme","can_see_other_account_routing_address","can_query_available_funds","can_add_transaction_request_to_own_account","can_add_transaction_request_to_any_account","can_see_bank_account_credit_limit","can_create_direct_debit","can_create_standing_order"]} |
| { "name":"_test", "description":"This view is for family", "metadata_view":"_test", "is_public":true, "which_alias_to_use":"family", "hide_metadata_if_alias_used":false, "allowed_actions":[$CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,$CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,$CAN_SEE_TRANSACTION_METADATA,,$CAN_SEE_TRANSACTION_AMOUNT,$CAN_SEE_TRANSACTION_TYPE,$CAN_SEE_TRANSACTION_CURRENCY,$CAN_SEE_TRANSACTION_START_DATE,$CAN_SEE_TRANSACTION_FINISH_DATE,$CAN_SEE_TRANSACTION_BALANCE,$CAN_SEE_COMMENTS,$CAN_SEE_TAGS,$CAN_SEE_IMAGES,$CAN_SEE_BANK_ACCOUNT_OWNERS,$CAN_SEE_BANK_ACCOUNT_TYPE,$CAN_SEE_BANK_ACCOUNT_BALANCE,$CAN_SEE_BANK_ACCOUNT_CURRENCY,$CAN_SEE_BANK_ACCOUNT_LABEL,$CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,$CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,$CAN_SEE_BANK_ACCOUNT_IBAN,$CAN_SEE_BANK_ACCOUNT_NUMBER,$CAN_SEE_BANK_ACCOUNT_BANK_NAME,$CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,$CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,$CAN_SEE_OTHER_ACCOUNT_IBAN,$CAN_SEE_OTHER_ACCOUNT_BANK_NAME,$CAN_SEE_OTHER_ACCOUNT_NUMBER,$CAN_SEE_OTHER_ACCOUNT_METADATA,$CAN_SEE_OTHER_ACCOUNT_KIND,$CAN_SEE_MORE_INFO,$CAN_SEE_URL,$CAN_SEE_IMAGE_URL,$CAN_SEE_OPEN_CORPORATES_URL,$CAN_SEE_CORPORATE_LOCATION,$CAN_SEE_PHYSICAL_LOCATION,$CAN_SEE_PUBLIC_ALIAS,$CAN_SEE_PRIVATE_ALIAS,$CAN_ADD_MORE_INFO,$CAN_ADD_URL,$CAN_ADD_IMAGE_URL,$CAN_ADD_OPEN_CORPORATES_URL,$CAN_ADD_CORPORATE_LOCATION,$CAN_ADD_PHYSICAL_LOCATION,$CAN_ADD_PUBLIC_ALIAS,$CAN_ADD_PRIVATE_ALIAS,$CAN_DELETE_CORPORATE_LOCATION,$CAN_DELETE_PHYSICAL_LOCATION,$CAN_ADD_COMMENT,$CAN_DELETE_COMMENT,$CAN_ADD_TAG,$CAN_DELETE_TAG,$CAN_ADD_IMAGE,$CAN_DELETE_IMAGE,$CAN_ADD_WHERE_TAG,$CAN_SEE_WHERE_TAG,$CAN_DELETE_WHERE_TAG,$CAN_SEE_BANK_ROUTING_SCHEME,$CAN_SEE_BANK_ROUTING_ADDRESS,$CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,$CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,$CAN_SEE_OTHER_BANK_ROUTING_SCHEME,$CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,$CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,$CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS,$CAN_QUERY_AVAILABLE_FUNDS,$CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT,$CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT,$CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT,$CAN_CREATE_DIRECT_DEBIT,$CAN_CREATE_STANDING_ORDER]} |
| Headers:
|
| Content-Type: application/json
@ -1432,7 +1429,7 @@ object Glossary extends MdcLoggable {
|
|Body:
|
| { "name":"_test", "description":"good", "is_public":false, "which_alias_to_use":"accountant", "hide_metadata_if_alias_used":false, "allowed_actions": ["can_see_transaction_this_bank_account", "can_see_transaction_other_bank_account", "can_see_transaction_metadata", "can_see_transaction_label", "can_see_transaction_amount", "can_see_transaction_type", "can_see_transaction_currency", "can_see_transaction_start_date", "can_see_transaction_finish_date", "can_see_transaction_balance", "can_see_comments", "can_see_narrative", "can_see_tags", "can_see_images", "can_see_bank_account_owners", "can_see_bank_account_type", "can_see_bank_account_balance", "can_see_bank_account_currency", "can_see_bank_account_label", "can_see_bank_account_national_identifier", "can_see_bank_account_swift_bic", "can_see_bank_account_iban", "can_see_bank_account_number", "can_see_bank_account_bank_name", "can_see_other_account_national_identifier", "can_see_other_account_swift_bic", "can_see_other_account_iban", "can_see_other_account_bank_name", "can_see_other_account_number", "can_see_other_account_metadata", "can_see_other_account_kind", "can_see_more_info", "can_see_url", "can_see_image_url", "can_see_open_corporates_url", "can_see_corporate_location", "can_see_physical_location", "can_see_public_alias", "can_see_private_alias", "can_add_more_info", "can_add_url", "can_add_image_url", "can_add_open_corporates_url", "can_add_corporate_location", "can_add_physical_location", "can_add_public_alias", "can_add_private_alias", "can_delete_corporate_location", "can_delete_physical_location", "can_edit_narrative", "can_add_comment", "can_delete_comment", "can_add_tag", "can_delete_tag", "can_add_image", "can_delete_image", "can_add_where_tag", "can_see_where_tag", "can_delete_where_tag", "can_create_counterparty", "can_see_bank_routing_scheme", "can_see_bank_routing_address", "can_see_bank_account_routing_scheme", "can_see_bank_account_routing_address", "can_see_other_bank_routing_scheme", "can_see_other_bank_routing_address", "can_see_other_account_routing_scheme", "can_see_other_account_routing_address"]}
| { "name":"_test", "description":"good", "is_public":false, "which_alias_to_use":"accountant", "hide_metadata_if_alias_used":false, "allowed_actions": [$CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,$CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,$CAN_SEE_TRANSACTION_METADATA,,$CAN_SEE_TRANSACTION_AMOUNT,$CAN_SEE_TRANSACTION_TYPE,$CAN_SEE_TRANSACTION_CURRENCY,$CAN_SEE_TRANSACTION_START_DATE,$CAN_SEE_TRANSACTION_FINISH_DATE,$CAN_SEE_TRANSACTION_BALANCE,$CAN_SEE_COMMENTS,$CAN_SEE_TAGS,$CAN_SEE_IMAGES,$CAN_SEE_BANK_ACCOUNT_OWNERS,$CAN_SEE_BANK_ACCOUNT_TYPE,$CAN_SEE_BANK_ACCOUNT_BALANCE,$CAN_SEE_BANK_ACCOUNT_CURRENCY,$CAN_SEE_BANK_ACCOUNT_LABEL,$CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,$CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,$CAN_SEE_BANK_ACCOUNT_IBAN,$CAN_SEE_BANK_ACCOUNT_NUMBER,$CAN_SEE_BANK_ACCOUNT_BANK_NAME,$CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,$CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,$CAN_SEE_OTHER_ACCOUNT_IBAN,$CAN_SEE_OTHER_ACCOUNT_BANK_NAME,$CAN_SEE_OTHER_ACCOUNT_NUMBER,$CAN_SEE_OTHER_ACCOUNT_METADATA,$CAN_SEE_OTHER_ACCOUNT_KIND,$CAN_SEE_MORE_INFO,$CAN_SEE_URL,$CAN_SEE_IMAGE_URL,$CAN_SEE_OPEN_CORPORATES_URL,$CAN_SEE_CORPORATE_LOCATION,$CAN_SEE_PHYSICAL_LOCATION,$CAN_SEE_PUBLIC_ALIAS,$CAN_SEE_PRIVATE_ALIAS,$CAN_ADD_MORE_INFO,$CAN_ADD_URL,$CAN_ADD_IMAGE_URL,$CAN_ADD_OPEN_CORPORATES_URL,$CAN_ADD_CORPORATE_LOCATION,$CAN_ADD_PHYSICAL_LOCATION,$CAN_ADD_PUBLIC_ALIAS,$CAN_ADD_PRIVATE_ALIAS,$CAN_DELETE_CORPORATE_LOCATION,$CAN_DELETE_PHYSICAL_LOCATION,$CAN_ADD_COMMENT,$CAN_DELETE_COMMENT,$CAN_ADD_TAG,$CAN_DELETE_TAG,$CAN_ADD_IMAGE,$CAN_DELETE_IMAGE,$CAN_ADD_WHERE_TAG,$CAN_SEE_WHERE_TAG,$CAN_DELETE_WHERE_TAG,$CAN_SEE_BANK_ROUTING_SCHEME,$CAN_SEE_BANK_ROUTING_ADDRESS,$CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME,$CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS,$CAN_SEE_OTHER_BANK_ROUTING_SCHEME,$CAN_SEE_OTHER_BANK_ROUTING_ADDRESS,$CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME,$CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS,$CAN_QUERY_AVAILABLE_FUNDS,$CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT,$CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT,$CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT,$CAN_CREATE_DIRECT_DEBIT,$CAN_CREATE_STANDING_ORDER]}
|
| Headers:
|
@ -3352,7 +3349,7 @@ object Glossary extends MdcLoggable {
|
|Rule for calculating number of security challenges:
|If product Account attribute REQUIRED_CHALLENGE_ANSWERS=N then create N challenges
|(one for every user that has a View where permission "can_add_transaction_request_to_any_account"=true)
|(one for every user that has a View where permission $CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT=true)
|In case REQUIRED_CHALLENGE_ANSWERS is not defined as an account attribute default value is 1.
|
|Transaction Requests contain charge information giving the client the opportunity to proceed or not (as long as the challenge level is appropriate).

View File

@ -605,7 +605,7 @@ trait APIMethods121 {
createViewJsonV121.allowed_actions
)
anyViewContainsCanCreateCustomViewPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_CREATE_CUSTOM_VIEW)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_CREATE_CUSTOM_VIEW))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- booleanToBox(
anyViewContainsCanCreateCustomViewPermission,
s"${ErrorMessages.CreateCustomViewError} You need the `${StringHelpers.snakify(CAN_CREATE_CUSTOM_VIEW)}` permission on any your views"
@ -667,7 +667,7 @@ trait APIMethods121 {
allowed_actions = updateJsonV121.allowed_actions
)
anyViewContainsCanUpdateCustomViewPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_UPDATE_CUSTOM_VIEW)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_UPDATE_CUSTOM_VIEW))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- booleanToBox(
anyViewContainsCanUpdateCustomViewPermission,
s"${ErrorMessages.CreateCustomViewError} You need the `${StringHelpers.snakify(CAN_UPDATE_CUSTOM_VIEW)}` permission on any your views"
@ -713,7 +713,7 @@ trait APIMethods121 {
_ <- NewStyle.function.customView(viewId, BankIdAccountId(bankId, accountId), callContext)
anyViewContainsCanDeleteCustomViewPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_DELETE_CUSTOM_VIEW)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_DELETE_CUSTOM_VIEW))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- Helper.booleanToFuture(
s"${ErrorMessages.ViewDoesNotPermitAccess} You need the `${StringHelpers.snakify(CAN_DELETE_CUSTOM_VIEW)}` permission on any your views",
cc = callContext
@ -752,7 +752,7 @@ trait APIMethods121 {
u <- cc.user ?~ UserNotLoggedIn
account <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound
anyViewContainsCanSeeViewsWithPermissionsForAllUsersPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- booleanToBox(
anyViewContainsCanSeeViewsWithPermissionsForAllUsersPermission,
s"${ErrorMessages.CreateCustomViewError} You need the `${StringHelpers.snakify(CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS)}` permission on any your views"
@ -796,8 +796,8 @@ trait APIMethods121 {
loggedInUser <- cc.user ?~ UserNotLoggedIn
account <- BankAccountX(bankId, accountId) ?~! BankAccountNotFound
loggedInUserPermissionBox = Views.views.vend.permission(BankIdAccountId(bankId, accountId), loggedInUser)
anyViewContainsCanSeeViewsWithPermissionsForOneUserPermission = loggedInUserPermissionBox.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER))
.find(_.==(true)).getOrElse(false)).getOrElse(false)
anyViewContainsCanSeeViewsWithPermissionsForOneUserPermission = loggedInUserPermissionBox.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER)))
.getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- booleanToBox(
anyViewContainsCanSeeViewsWithPermissionsForOneUserPermission,
s"${ErrorMessages.CreateCustomViewError} You need the `${StringHelpers.snakify(CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER)}` permission on any your views"

View File

@ -407,6 +407,8 @@ object JSONFactory{
else
""
val allowed_actions = view.allowed_actions
new ViewJSONV121(
id = view.viewId.value,
short_name = stringOrNull(view.name),
@ -414,65 +416,65 @@ object JSONFactory{
is_public = view.isPublic,
alias = alias,
hide_metadata_if_alias_used = view.hideOtherAccountMetadataIfAlias,
can_add_comment = view.allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = view.allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = view.allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = view.allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = view.allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = view.allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = view.allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = view.allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = view.allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = view.allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = view.allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = view.allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_delete_comment = view.allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_delete_corporate_location = view.allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = view.allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = view.allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = view.allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = view.allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = view.allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_see_bank_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = view.allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = view.allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = view.allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = view.allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = view.allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = view.allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = view.allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = view.allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = view.allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = view.allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = view.allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = view.allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = view.allowed_actions.exists(_ == CAN_SEE_WHERE_TAG)
can_add_comment = allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_delete_comment = allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_delete_corporate_location = allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_see_bank_account_bank_name = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = allowed_actions.exists(_ == CAN_SEE_WHERE_TAG)
)
}

View File

@ -1050,7 +1050,7 @@ trait APIMethods200 {
(_, callContext) <- NewStyle.function.getBank(bankId, callContext)
(account, callContext) <- NewStyle.function.getBankAccount(bankId, accountId, callContext)
anyViewContainsCanSeeViewsWithPermissionsForAllUsersPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- Helper.booleanToFuture(
s"${ErrorMessages.ViewDoesNotPermitAccess} You need the `${StringHelpers.snakify(CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS)}` permission on any your views",
cc = callContext
@ -1092,8 +1092,8 @@ trait APIMethods200 {
(bank, callContext) <- BankX(bankId, Some(cc)) ?~! BankNotFound // Check bank exists.
account <- BankAccountX(bank.bankId, accountId) ?~! {ErrorMessages.AccountNotFound} // Check Account exists.
loggedInUserPermissionBox = Views.views.vend.permission(BankIdAccountId(bankId, accountId), loggedInUser)
anyViewContainsCanSeePermissionForOneUserPermission = loggedInUserPermissionBox.map(_.views.map(_.allowed_actions.exists( _ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER))
.find(_.==(true)).getOrElse(false)).getOrElse(false)
anyViewContainsCanSeePermissionForOneUserPermission = loggedInUserPermissionBox.map(_.views.map(_.allowed_actions.exists( _ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER)))
.getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- booleanToBox(
anyViewContainsCanSeePermissionForOneUserPermission,

View File

@ -793,6 +793,7 @@ object JSONFactory210{
else
""
val allowed_actions = view.allowed_actions
new ViewJSON(
id = view.viewId.value,
short_name = stringOrNull(view.name),
@ -800,66 +801,66 @@ object JSONFactory210{
is_public = view.isPublic,
alias = alias,
hide_metadata_if_alias_used = view.hideOtherAccountMetadataIfAlias,
can_add_comment = view.allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = view.allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = view.allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = view.allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = view.allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = view.allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = view.allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = view.allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = view.allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = view.allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = view.allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = view.allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_add_counterparty = view.allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_comment = view.allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_delete_corporate_location = view.allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = view.allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = view.allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = view.allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = view.allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = view.allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_see_bank_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = view.allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = view.allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = view.allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = view.allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = view.allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = view.allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = view.allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = view.allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = view.allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = view.allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = view.allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = view.allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = view.allowed_actions.exists(_ == CAN_SEE_WHERE_TAG)
can_add_comment = allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_add_counterparty = allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_comment = allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_delete_corporate_location = allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_see_bank_account_bank_name = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = allowed_actions.exists(_ == CAN_SEE_WHERE_TAG)
)
}

View File

@ -384,6 +384,7 @@ object JSONFactory220 {
else
""
val allowed_actions = view.allowed_actions
new ViewJSONV220(
id = view.viewId.value,
short_name = stringOrNull(view.name),
@ -391,66 +392,66 @@ object JSONFactory220 {
is_public = view.isPublic,
alias = alias,
hide_metadata_if_alias_used = view.hideOtherAccountMetadataIfAlias,
can_add_comment = view.allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = view.allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = view.allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = view.allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = view.allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = view.allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = view.allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = view.allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = view.allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = view.allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = view.allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = view.allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_add_counterparty = view.allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_comment = view.allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_delete_corporate_location = view.allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = view.allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = view.allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = view.allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = view.allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = view.allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_see_bank_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = view.allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = view.allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = view.allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = view.allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = view.allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = view.allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = view.allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = view.allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = view.allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = view.allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = view.allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = view.allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = view.allowed_actions.exists(_ == CAN_SEE_WHERE_TAG)
can_add_comment = allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_add_counterparty = allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_comment = allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_delete_corporate_location = allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_see_bank_account_bank_name = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = allowed_actions.exists(_ == CAN_SEE_WHERE_TAG)
)
}

View File

@ -210,7 +210,7 @@ trait APIMethods300 {
(account, callContext) <- NewStyle.function.getBankAccount(bankId, accountId, callContext)
anyViewContainsCanCreateCustomViewPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_CREATE_CUSTOM_VIEW)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_CREATE_CUSTOM_VIEW))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- Helper.booleanToFuture(
s"${ErrorMessages.ViewDoesNotPermitAccess} You need the `${StringHelpers.snakify(CAN_CREATE_CUSTOM_VIEW)}` permission on any your views",
@ -250,7 +250,7 @@ trait APIMethods300 {
(_, callContext) <- NewStyle.function.getBank(bankId, callContext)
(account, callContext) <- NewStyle.function.checkBankAccountExists(bankId, accountId, callContext)
anyViewContainsCanSeePermissionForOneUserPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), loggedInUser)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- Helper.booleanToFuture(
s"${ErrorMessages.ViewDoesNotPermitAccess} You need the `${StringHelpers.snakify(CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER)}` permission on any your views",
cc = callContext
@ -316,7 +316,7 @@ trait APIMethods300 {
(account, callContext) <- NewStyle.function.getBankAccount(bankId, accountId, callContext)
anyViewContainsCancanUpdateCustomViewPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_UPDATE_CUSTOM_VIEW)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_UPDATE_CUSTOM_VIEW))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- Helper.booleanToFuture(
s"${ErrorMessages.ViewDoesNotPermitAccess} You need the `${StringHelpers.snakify(CAN_UPDATE_CUSTOM_VIEW)}` permission on any your views",

View File

@ -730,6 +730,7 @@ object JSONFactory300{
else
""
val allowed_actions = view.allowed_actions
ViewJsonV300(
id = view.viewId.value,
short_name = stringOrNull(view.name),
@ -739,81 +740,81 @@ object JSONFactory300{
is_system = view.isSystem,
alias = alias,
hide_metadata_if_alias_used = view.hideOtherAccountMetadataIfAlias,
can_add_comment = view.allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = view.allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = view.allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = view.allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = view.allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = view.allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = view.allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = view.allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = view.allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = view.allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = view.allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = view.allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_delete_comment = view.allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_add_counterparty = view.allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_corporate_location = view.allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = view.allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = view.allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = view.allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = view.allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = view.allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_query_available_funds = view.allowed_actions.exists(_ == CAN_QUERY_AVAILABLE_FUNDS),
can_see_bank_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = view.allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = view.allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = view.allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = view.allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = view.allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = view.allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = view.allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = view.allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = view.allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = view.allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = view.allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = view.allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = view.allowed_actions.exists(_ == CAN_SEE_WHERE_TAG),
can_add_comment = allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_delete_comment = allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_add_counterparty = allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_corporate_location = allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_query_available_funds = allowed_actions.exists(_ == CAN_QUERY_AVAILABLE_FUNDS),
can_see_bank_account_bank_name = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = allowed_actions.exists(_ == CAN_SEE_WHERE_TAG),
//V300 new
can_see_bank_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME),
can_see_bank_routing_address = view.allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS),
can_see_bank_account_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME),
can_see_bank_account_routing_address = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS),
can_see_other_bank_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME),
can_see_other_bank_routing_address = view.allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS),
can_see_other_account_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME),
can_see_other_account_routing_address= view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS),
can_add_transaction_request_to_own_account = view.allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT), //added following two for payments
can_add_transaction_request_to_any_account = view.allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT),
can_see_bank_account_credit_limit = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT),
can_create_direct_debit = view.allowed_actions.exists(_ == CAN_CREATE_DIRECT_DEBIT),
can_create_standing_order = view.allowed_actions.exists(_ == CAN_CREATE_STANDING_ORDER)
can_see_bank_routing_scheme = allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME),
can_see_bank_routing_address = allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS),
can_see_bank_account_routing_scheme = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME),
can_see_bank_account_routing_address = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS),
can_see_other_bank_routing_scheme = allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME),
can_see_other_bank_routing_address = allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS),
can_see_other_account_routing_scheme = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME),
can_see_other_account_routing_address= allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS),
can_add_transaction_request_to_own_account = allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT), //added following two for payments
can_add_transaction_request_to_any_account = allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT),
can_see_bank_account_credit_limit = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT),
can_create_direct_debit = allowed_actions.exists(_ == CAN_CREATE_DIRECT_DEBIT),
can_create_standing_order = allowed_actions.exists(_ == CAN_CREATE_STANDING_ORDER)
)
}
def createBasicViewJSON(view : View) : BasicViewJson = {

View File

@ -1014,7 +1014,7 @@ trait APIMethods400 extends MdcLoggable {
"POST",
"/banks/BANK_ID/accounts/ACCOUNT_ID/VIEW_ID/transaction-request-types/TRANSACTION_REQUEST_TYPE/transaction-requests/TRANSACTION_REQUEST_ID/challenge",
"Answer Transaction Request Challenge",
"""In Sandbox mode, any string that can be converted to a positive integer will be accepted as an answer.
s"""In Sandbox mode, any string that can be converted to a positive integer will be accepted as an answer.
|
|This endpoint totally depends on createTransactionRequest, it need get the following data from createTransactionRequest response body.
|
@ -1051,7 +1051,7 @@ trait APIMethods400 extends MdcLoggable {
|
|Rule for calculating number of security challenges:
|If Product Account attribute REQUIRED_CHALLENGE_ANSWERS=N then create N challenges
|(one for every user that has a View where permission "can_add_transaction_request_to_any_account"=true)
|(one for every user that has a View where permission $CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT=true)
|In the case REQUIRED_CHALLENGE_ANSWERS is not defined as an account attribute, the default number of security challenges created is one.
|
""".stripMargin,
@ -2305,7 +2305,7 @@ trait APIMethods400 extends MdcLoggable {
json.extract[UpdateAccountJsonV400]
}
anyViewContainsCanUpdateBankAccountLabelPermission = Views.views.vend.permission(BankIdAccountId(account.bankId, account.accountId), u)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_UPDATE_BANK_ACCOUNT_LABEL)).find(_.==(true)).getOrElse(false)).getOrElse(false)
.map(_.views.map(_.allowed_actions.exists(_ == CAN_UPDATE_BANK_ACCOUNT_LABEL))).getOrElse(Nil).find(_.==(true)).getOrElse(false)
_ <- Helper.booleanToFuture(
s"${ErrorMessages.ViewDoesNotPermitAccess} You need the `${StringHelpers.snakify(CAN_UPDATE_BANK_ACCOUNT_LABEL)}` permission on any your views",
cc = callContext

View File

@ -986,9 +986,9 @@ trait APIMethods500 {
val vrpViewId = s"_vrp-${UUID.randomUUID.toString}".dropRight(5)// to make sure the length of the viewId is 36.
val targetPermissions = List(//may need getTransactionRequest . so far only these payments.
"can_add_transaction_request_to_beneficiary",
"can_get_counterparty",
"can_see_transaction_requests"
CAN_ADD_TRANSACTION_REQUEST_TO_BENEFICIARY,
CAN_GET_COUNTERPARTY,
CAN_SEE_TRANSACTION_REQUESTS,
)
val targetCreateCustomViewJson = CreateCustomViewJson(

View File

@ -810,6 +810,8 @@ object JSONFactory500 {
}
def createViewJsonV500(view : View) : ViewJsonV500 = {
val allowed_actions = view.allowed_actions
val alias =
if(view.usePublicAliasIfOneExists)
"public"
@ -828,81 +830,81 @@ object JSONFactory500 {
is_firehose = Some(view.isFirehose),
alias = alias,
hide_metadata_if_alias_used = view.hideOtherAccountMetadataIfAlias,
can_add_comment = view.allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = view.allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = view.allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = view.allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = view.allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = view.allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = view.allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = view.allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = view.allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = view.allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = view.allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = view.allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_delete_comment = view.allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_add_counterparty = view.allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_corporate_location = view.allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = view.allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = view.allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = view.allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = view.allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = view.allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_query_available_funds = view.allowed_actions.exists(_ == CAN_QUERY_AVAILABLE_FUNDS),
can_see_bank_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = view.allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = view.allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = view.allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = view.allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = view.allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = view.allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = view.allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = view.allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = view.allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = view.allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = view.allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = view.allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = view.allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = view.allowed_actions.exists(_ == CAN_SEE_WHERE_TAG),
can_add_comment = allowed_actions.exists(_ == CAN_ADD_COMMENT),
can_add_corporate_location = allowed_actions.exists(_ == CAN_ADD_CORPORATE_LOCATION),
can_add_image = allowed_actions.exists(_ == CAN_ADD_IMAGE),
can_add_image_url = allowed_actions.exists(_ == CAN_ADD_IMAGE_URL),
can_add_more_info = allowed_actions.exists(_ == CAN_ADD_MORE_INFO),
can_add_open_corporates_url = allowed_actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL),
can_add_physical_location = allowed_actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION),
can_add_private_alias = allowed_actions.exists(_ == CAN_ADD_PRIVATE_ALIAS),
can_add_public_alias = allowed_actions.exists(_ == CAN_ADD_PUBLIC_ALIAS),
can_add_tag = allowed_actions.exists(_ == CAN_ADD_TAG),
can_add_url = allowed_actions.exists(_ == CAN_ADD_URL),
can_add_where_tag = allowed_actions.exists(_ == CAN_ADD_WHERE_TAG),
can_delete_comment = allowed_actions.exists(_ == CAN_DELETE_COMMENT),
can_add_counterparty = allowed_actions.exists(_ == CAN_ADD_COUNTERPARTY),
can_delete_corporate_location = allowed_actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION),
can_delete_image = allowed_actions.exists(_ == CAN_DELETE_IMAGE),
can_delete_physical_location = allowed_actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION),
can_delete_tag = allowed_actions.exists(_ == CAN_DELETE_TAG),
can_delete_where_tag = allowed_actions.exists(_ == CAN_DELETE_WHERE_TAG),
can_edit_owner_comment = allowed_actions.exists(_ == CAN_EDIT_OWNER_COMMENT),
can_see_bank_account_balance = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE),
can_query_available_funds = allowed_actions.exists(_ == CAN_QUERY_AVAILABLE_FUNDS),
can_see_bank_account_bank_name = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME),
can_see_bank_account_currency = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY),
can_see_bank_account_iban = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN),
can_see_bank_account_label = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL),
can_see_bank_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_bank_account_number = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER),
can_see_bank_account_owners = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS),
can_see_bank_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC),
can_see_bank_account_type = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE),
can_see_comments = allowed_actions.exists(_ == CAN_SEE_COMMENTS),
can_see_corporate_location = allowed_actions.exists(_ == CAN_SEE_CORPORATE_LOCATION),
can_see_image_url = allowed_actions.exists(_ == CAN_SEE_IMAGE_URL),
can_see_images = allowed_actions.exists(_ == CAN_SEE_IMAGES),
can_see_more_info = allowed_actions.exists(_ == CAN_SEE_MORE_INFO),
can_see_open_corporates_url = allowed_actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL),
can_see_other_account_bank_name = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME),
can_see_other_account_iban = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN),
can_see_other_account_kind = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND),
can_see_other_account_metadata = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA),
can_see_other_account_national_identifier = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER),
can_see_other_account_number = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER),
can_see_other_account_swift_bic = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC),
can_see_owner_comment = allowed_actions.exists(_ == CAN_SEE_OWNER_COMMENT),
can_see_physical_location = allowed_actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION),
can_see_private_alias = allowed_actions.exists(_ == CAN_SEE_PRIVATE_ALIAS),
can_see_public_alias = allowed_actions.exists(_ == CAN_SEE_PUBLIC_ALIAS),
can_see_tags = allowed_actions.exists(_ == CAN_SEE_TAGS),
can_see_transaction_amount = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT),
can_see_transaction_balance = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE),
can_see_transaction_currency = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY),
can_see_transaction_description = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION),
can_see_transaction_finish_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE),
can_see_transaction_metadata = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_METADATA),
can_see_transaction_other_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT),
can_see_transaction_start_date = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE),
can_see_transaction_this_bank_account = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT),
can_see_transaction_type = allowed_actions.exists(_ == CAN_SEE_TRANSACTION_TYPE),
can_see_url = allowed_actions.exists(_ == CAN_SEE_URL),
can_see_where_tag = allowed_actions.exists(_ == CAN_SEE_WHERE_TAG),
//V300 new
can_see_bank_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME),
can_see_bank_routing_address = view.allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS),
can_see_bank_account_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME),
can_see_bank_account_routing_address = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS),
can_see_other_bank_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME),
can_see_other_bank_routing_address = view.allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS),
can_see_other_account_routing_scheme = view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME),
can_see_other_account_routing_address= view.allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS),
can_add_transaction_request_to_own_account = view.allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT), //added following two for payments
can_add_transaction_request_to_any_account = view.allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT),
can_see_bank_account_credit_limit = view.allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT),
can_create_direct_debit = view.allowed_actions.exists(_ == CAN_CREATE_DIRECT_DEBIT),
can_create_standing_order = view.allowed_actions.exists(_ == CAN_CREATE_STANDING_ORDER),
can_see_bank_routing_scheme = allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME),
can_see_bank_routing_address = allowed_actions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS),
can_see_bank_account_routing_scheme = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME),
can_see_bank_account_routing_address = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS),
can_see_other_bank_routing_scheme = allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME),
can_see_other_bank_routing_address = allowed_actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS),
can_see_other_account_routing_scheme = allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME),
can_see_other_account_routing_address= allowed_actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS),
can_add_transaction_request_to_own_account = allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_OWN_ACCOUNT), //added following two for payments
can_add_transaction_request_to_any_account = allowed_actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT),
can_see_bank_account_credit_limit = allowed_actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT),
can_create_direct_debit = allowed_actions.exists(_ == CAN_CREATE_DIRECT_DEBIT),
can_create_standing_order = allowed_actions.exists(_ == CAN_CREATE_STANDING_ORDER),
// Version 5.0.0
can_grant_access_to_views = view.canGrantAccessToViews.getOrElse(Nil),
can_revoke_access_to_views = view.canRevokeAccessToViews.getOrElse(Nil),

View File

@ -4719,7 +4719,8 @@ object LocalMappedConnector extends Connector with MdcLoggable {
for (
permission <- Views.views.vend.permissions(BankIdAccountId(bankId, accountId))
) yield {
permission.views.exists(_.allowed_actions.exists( _ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT)) match {
permission.views.exists(view =>view.view.allowed_actions.exists( _ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT))
match {
case true => Some(permission.user)
case _ => None
}

View File

@ -67,60 +67,60 @@ case class ViewExtended(val view: View) {
//transaction metadata
val transactionMetadata =
if(viewPermissions.exists(_ == "canSeeTransactionMetadata"))
if(viewPermissions.exists(_ == CAN_SEE_TRANSACTION_METADATA))
{
val ownerComment = if (viewPermissions.exists(_ == "canSeeOwnerComment")) Some(transaction.metadata.ownerComment()) else None
val ownerComment = if (viewPermissions.exists(_ == CAN_SEE_OWNER_COMMENT)) Some(transaction.metadata.ownerComment()) else None
val comments =
if (viewPermissions.exists(_ == "canSeeComments"))
if (viewPermissions.exists(_ == CAN_SEE_COMMENTS))
Some(transaction.metadata.comments(view.viewId))
else None
val addCommentFunc= if(viewPermissions.exists(_ == "canAddComment")) Some(transaction.metadata.addComment) else None
val addCommentFunc= if(viewPermissions.exists(_ == CAN_ADD_COMMENT)) Some(transaction.metadata.addComment) else None
val deleteCommentFunc =
if(viewPermissions.exists(_ == "canDeleteComment"))
if(viewPermissions.exists(_ == CAN_DELETE_COMMENT))
Some(transaction.metadata.deleteComment)
else
None
val addOwnerCommentFunc:Option[String=> Boolean] = if (viewPermissions.exists(_ == "canEditOwnerComment")) Some(transaction.metadata.addOwnerComment) else None
val addOwnerCommentFunc:Option[String=> Boolean] = if (viewPermissions.exists(_ == CAN_EDIT_OWNER_COMMENT)) Some(transaction.metadata.addOwnerComment) else None
val tags =
if(viewPermissions.exists(_ == "canSeeTags"))
if(viewPermissions.exists(_ == CAN_SEE_TAGS))
Some(transaction.metadata.tags(view.viewId))
else None
val addTagFunc =
if(viewPermissions.exists(_ == "canAddTag"))
if(viewPermissions.exists(_ == CAN_ADD_TAG))
Some(transaction.metadata.addTag)
else
None
val deleteTagFunc =
if(viewPermissions.exists(_ == "canDeleteTag"))
if(viewPermissions.exists(_ == CAN_DELETE_TAG))
Some(transaction.metadata.deleteTag)
else
None
val images =
if(viewPermissions.exists(_ == "canSeeImages")) Some(transaction.metadata.images(view.viewId))
if(viewPermissions.exists(_ == CAN_SEE_IMAGES)) Some(transaction.metadata.images(view.viewId))
else None
val addImageFunc =
if(viewPermissions.exists(_ == "canAddImage")) Some(transaction.metadata.addImage)
if(viewPermissions.exists(_ == CAN_ADD_IMAGE)) Some(transaction.metadata.addImage)
else None
val deleteImageFunc =
if(viewPermissions.exists(_ == "canDeleteImage")) Some(transaction.metadata.deleteImage)
if(viewPermissions.exists(_ == CAN_DELETE_IMAGE)) Some(transaction.metadata.deleteImage)
else None
val whereTag =
if(viewPermissions.exists(_ == "canSeeWhereTag"))
if(viewPermissions.exists(_ == CAN_SEE_WHERE_TAG))
Some(transaction.metadata.whereTags(view.viewId))
else
None
val addWhereTagFunc : Option[(UserPrimaryKey, ViewId, Date, Double, Double) => Boolean] =
if(viewPermissions.exists(_ == "canAddWhereTag"))
if(viewPermissions.exists(_ == CAN_ADD_WHERE_TAG))
Some(transaction.metadata.addWhereTag)
else
Empty
val deleteWhereTagFunc : Option[(ViewId) => Boolean] =
if (viewPermissions.exists(_ == "canDeleteWhereTag"))
if (viewPermissions.exists(_ == CAN_DELETE_WHERE_TAG))
Some(transaction.metadata.deleteWhereTag)
else
Empty
@ -149,35 +149,35 @@ case class ViewExtended(val view: View) {
None
val transactionType =
if (viewPermissions.exists(_ == "canSeeTransactionType")) Some(transaction.transactionType)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_TYPE)) Some(transaction.transactionType)
else None
val transactionAmount =
if (viewPermissions.exists(_ == "canSeeTransactionAmount")) Some(transaction.amount)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT)) Some(transaction.amount)
else None
val transactionCurrency =
if (viewPermissions.exists(_ == "canSeeTransactionCurrency")) Some(transaction.currency)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY)) Some(transaction.currency)
else None
val transactionDescription =
if (viewPermissions.exists(_ == "canSeeTransactionDescription")) transaction.description
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION)) transaction.description
else None
val transactionStartDate =
if (viewPermissions.exists(_ == "canSeeTransactionStartDate")) Some(transaction.startDate)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_START_DATE)) Some(transaction.startDate)
else None
val transactionFinishDate =
if (viewPermissions.exists(_ == "canSeeTransactionFinishDate")) Some(transaction.finishDate)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE)) Some(transaction.finishDate)
else None
val transactionBalance =
if (viewPermissions.exists(_ == "canSeeTransactionBalance") && transaction.balance != null) transaction.balance.toString()
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_BALANCE) && transaction.balance != null) transaction.balance.toString()
else ""
val transactionStatus =
if (viewPermissions.exists(_ == "canSeeTransactionStatus")) transaction.status
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_STATUS)) transaction.status
else ""
new ModeratedTransaction(
@ -223,31 +223,31 @@ case class ViewExtended(val view: View) {
val otherBankAccount = moderateCore(transactionCore.otherAccount)
val transactionType =
if (viewPermissions.exists(_ == "canSeeTransactionType")) Some(transactionCore.transactionType)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_TYPE)) Some(transactionCore.transactionType)
else None
val transactionAmount =
if (viewPermissions.exists(_ == "canSeeTransactionAmount")) Some(transactionCore.amount)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT)) Some(transactionCore.amount)
else None
val transactionCurrency =
if (viewPermissions.exists(_ == "canSeeTransactionCurrency")) Some(transactionCore.currency)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY)) Some(transactionCore.currency)
else None
val transactionDescription =
if (viewPermissions.exists(_ == "canSeeTransactionDescription")) transactionCore.description
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_DESCRIPTION)) transactionCore.description
else None
val transactionStartDate =
if (viewPermissions.exists(_ == "canSeeTransactionStartDate")) Some(transactionCore.startDate)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_START_DATE)) Some(transactionCore.startDate)
else None
val transactionFinishDate =
if (viewPermissions.exists(_ == "canSeeTransactionFinishDate")) Some(transactionCore.finishDate)
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE)) Some(transactionCore.finishDate)
else None
val transactionBalance =
if (viewPermissions.exists(_ == "canSeeTransactionBalance") && transactionCore.balance != null) transactionCore.balance.toString()
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_BALANCE) && transactionCore.balance != null) transactionCore.balance.toString()
else ""
new ModeratedTransactionCore(
@ -327,27 +327,27 @@ case class ViewExtended(val view: View) {
def moderateAccount(bank: Bank, bankAccount: BankAccount) : Box[ModeratedBankAccount] = {
val viewPermissions = getViewPermissions
if(viewPermissions.exists(_ == "canSeeTransactionThisBankAccount"))
if(viewPermissions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT))
{
val owners : Set[User] = if(viewPermissions.exists(_ == "canSeeBankAccountOwners")) bankAccount.userOwners else Set()
val balance = if(viewPermissions.exists(_ == "canSeeBankAccountBalance") && bankAccount.balance != null) bankAccount.balance.toString else ""
val accountType = if(viewPermissions.exists(_ == "canSeeBankAccountType")) Some(bankAccount.accountType) else None
val currency = if(viewPermissions.exists(_ == "canSeeBankAccountCurrency")) Some(bankAccount.currency) else None
val label = if (viewPermissions.exists(_ == "canSeeBankAccountLabel")) Some(bankAccount.label) else None
val iban = if (viewPermissions.exists(_ == "canSeeBankAccountIban")) bankAccount.accountRoutings.find(_.scheme == AccountRoutingScheme.IBAN.toString).map(_.address) else None
val number = if (viewPermissions.exists(_ == "canSeeBankAccountNumber")) Some(bankAccount.number) else None
val owners : Set[User] = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS)) bankAccount.userOwners else Set()
val balance = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE) && bankAccount.balance != null) bankAccount.balance.toString else ""
val accountType = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE)) Some(bankAccount.accountType) else None
val currency = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY)) Some(bankAccount.currency) else None
val label = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL)) Some(bankAccount.label) else None
val iban = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN)) bankAccount.accountRoutings.find(_.scheme == AccountRoutingScheme.IBAN.toString).map(_.address) else None
val number = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER)) Some(bankAccount.number) else None
//From V300, use scheme and address stuff...
val accountRoutingScheme = if (viewPermissions.exists(_ == "canSeeBankAccountRoutingScheme")) bankAccount.accountRoutings.headOption.map(_.scheme) else None
val accountRoutingAddress = if (viewPermissions.exists(_ == "canSeeBankAccountRoutingAddress")) bankAccount.accountRoutings.headOption.map(_.address) else None
val accountRoutings = if (viewPermissions.exists(_ == "canSeeBankAccountRoutingScheme") && viewPermissions.exists(_ == "canSeeBankAccountRoutingAddress")) bankAccount.accountRoutings else Nil
val accountRules = if (viewPermissions.exists(_ == "canSeeBankAccountCreditLimit")) bankAccount.accountRules else Nil
val accountRoutingScheme = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME)) bankAccount.accountRoutings.headOption.map(_.scheme) else None
val accountRoutingAddress = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS)) bankAccount.accountRoutings.headOption.map(_.address) else None
val accountRoutings = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME) && viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS)) bankAccount.accountRoutings else Nil
val accountRules = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT)) bankAccount.accountRules else Nil
//followings are from the bank object.
val bankId = bank.bankId
val bankName = if (viewPermissions.exists(_ == "canSeeBankAccountBankName")) Some(bank.fullName) else None
val nationalIdentifier = if (viewPermissions.exists(_ == "canSeeBankAccountNationalIdentifier")) Some(bank.nationalIdentifier) else None
val bankRoutingScheme = if (viewPermissions.exists(_ == "canSeeBankRoutingScheme")) Some(bank.bankRoutingScheme) else None
val bankRoutingAddress = if (viewPermissions.exists(_ == "canSeeBankRoutingAddress")) Some(bank.bankRoutingAddress) else None
val bankName = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME)) Some(bank.fullName) else None
val nationalIdentifier = if (viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER)) Some(bank.nationalIdentifier) else None
val bankRoutingScheme = if (viewPermissions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME)) Some(bank.bankRoutingScheme) else None
val bankRoutingAddress = if (viewPermissions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS)) Some(bank.bankRoutingAddress) else None
Some(
new ModeratedBankAccount(
@ -381,25 +381,25 @@ case class ViewExtended(val view: View) {
def moderateAccountLegacy(bankAccount: BankAccount) : Box[ModeratedBankAccount] = {
val viewPermissions = getViewPermissions
if(viewPermissions.exists(_ == "canSeeTransactionThisBankAccount"))
if(viewPermissions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT))
{
val owners : Set[User] = if(viewPermissions.exists(_ == "canSeeBankAccountOwners")) bankAccount.userOwners else Set()
val balance = if(viewPermissions.exists(_ == "canSeeBankAccountBalance") && bankAccount.balance !=null) bankAccount.balance.toString else ""
val accountType = if(viewPermissions.exists(_ == "canSeeBankAccountType")) Some(bankAccount.accountType) else None
val currency = if(viewPermissions.exists(_ == "canSeeBankAccountCurrency")) Some(bankAccount.currency) else None
val label = if(viewPermissions.exists(_ == "canSeeBankAccountLabel")) Some(bankAccount.label) else None
val nationalIdentifier = if(viewPermissions.exists(_ == "canSeeBankAccountNationalIdentifier")) Some(bankAccount.nationalIdentifier) else None
val iban = if(viewPermissions.exists(_ == "canSeeBankAccountIban")) bankAccount.accountRoutings.find(_.scheme == AccountRoutingScheme.IBAN.toString).map(_.address) else None
val number = if(viewPermissions.exists(_ == "canSeeBankAccountNumber")) Some(bankAccount.number) else None
val bankName = if(viewPermissions.exists(_ == "canSeeBankAccountBankName")) Some(bankAccount.bankName) else None
val owners : Set[User] = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS)) bankAccount.userOwners else Set()
val balance = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE) && bankAccount.balance !=null) bankAccount.balance.toString else ""
val accountType = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE)) Some(bankAccount.accountType) else None
val currency = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY)) Some(bankAccount.currency) else None
val label = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL)) Some(bankAccount.label) else None
val nationalIdentifier = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER)) Some(bankAccount.nationalIdentifier) else None
val iban = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN)) bankAccount.accountRoutings.find(_.scheme == AccountRoutingScheme.IBAN.toString).map(_.address) else None
val number = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER)) Some(bankAccount.number) else None
val bankName = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME)) Some(bankAccount.bankName) else None
val bankId = bankAccount.bankId
//From V300, use scheme and address stuff...
val bankRoutingScheme = if(viewPermissions.exists(_ == "canSeeBankRoutingScheme")) Some(bankAccount.bankRoutingScheme) else None
val bankRoutingAddress = if(viewPermissions.exists(_ == "canSeeBankRoutingAddress")) Some(bankAccount.bankRoutingAddress) else None
val accountRoutingScheme = if(viewPermissions.exists(_ == "canSeeBankAccountRoutingScheme")) bankAccount.accountRoutings.headOption.map(_.scheme) else None
val accountRoutingAddress = if(viewPermissions.exists(_ == "canSeeBankAccountRoutingAddress")) bankAccount.accountRoutings.headOption.map(_.address) else None
val accountRoutings = if(viewPermissions.exists(_ == "canSeeBankAccountRoutingScheme") && viewPermissions.exists(_ == "canSeeBankAccountRoutingAddress")) bankAccount.accountRoutings else Nil
val accountRules = if(viewPermissions.exists(_ == "canSeeBankAccountCreditLimit")) bankAccount.accountRules else Nil
val bankRoutingScheme = if(viewPermissions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME)) Some(bankAccount.bankRoutingScheme) else None
val bankRoutingAddress = if(viewPermissions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS)) Some(bankAccount.bankRoutingAddress) else None
val accountRoutingScheme = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME)) bankAccount.accountRoutings.headOption.map(_.scheme) else None
val accountRoutingAddress = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS)) bankAccount.accountRoutings.headOption.map(_.address) else None
val accountRoutings = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME) && viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS)) bankAccount.accountRoutings else Nil
val accountRules = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT)) bankAccount.accountRules else Nil
Some(
new ModeratedBankAccount(
@ -429,19 +429,19 @@ case class ViewExtended(val view: View) {
def moderateAccountCore(bankAccount: BankAccount) : Box[ModeratedBankAccountCore] = {
val viewPermissions = getViewPermissions
if(viewPermissions.exists(_ == "canSeeTransactionThisBankAccount"))
if(viewPermissions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT))
{
val owners : Set[User] = if(viewPermissions.exists(_ == "canSeeBankAccountOwners")) bankAccount.userOwners else Set()
val balance = if(viewPermissions.exists(_ == "canSeeBankAccountBalance") && bankAccount.balance != null) Some(bankAccount.balance.toString) else None
val accountType = if(viewPermissions.exists(_ == "canSeeBankAccountType")) Some(bankAccount.accountType) else None
val currency = if(viewPermissions.exists(_ == "canSeeBankAccountCurrency")) Some(bankAccount.currency) else None
val label = if(viewPermissions.exists(_ == "canSeeBankAccountLabel")) Some(bankAccount.label) else None
val number = if(viewPermissions.exists(_ == "canSeeBankAccountNumber")) Some(bankAccount.number) else None
val owners : Set[User] = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS)) bankAccount.userOwners else Set()
val balance = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE) && bankAccount.balance != null) Some(bankAccount.balance.toString) else None
val accountType = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE)) Some(bankAccount.accountType) else None
val currency = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY)) Some(bankAccount.currency) else None
val label = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL)) Some(bankAccount.label) else None
val number = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER)) Some(bankAccount.number) else None
val bankId = bankAccount.bankId
//From V300, use scheme and address stuff...
val accountRoutings = if(viewPermissions.exists(_ == "canSeeBankAccountRoutingScheme") && viewPermissions.exists(_ == "canSeeBankAccountRoutingAddress")) bankAccount.accountRoutings else Nil
val accountRules = if(viewPermissions.exists(_ == "canSeeBankAccountCreditLimit")) bankAccount.accountRules else Nil
val accountRoutings = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME) && viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS)) bankAccount.accountRoutings else Nil
val accountRules = if(viewPermissions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT)) bankAccount.accountRules else Nil
Some(
ModeratedBankAccountCore(
@ -465,8 +465,8 @@ case class ViewExtended(val view: View) {
// Moderate the Counterparty side of the Transaction (i.e. the Other Account involved in the transaction)
def moderateOtherAccount(otherBankAccount : Counterparty) : Box[ModeratedOtherBankAccount] = {
val viewPermissions = getViewPermissions
if (viewPermissions.exists(_ == "canSeeTransactionOtherBankAccount"))
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT))
{
//other account data
val otherAccountId = otherBankAccount.counterpartyId
@ -507,37 +507,37 @@ case class ViewExtended(val view: View) {
}
implicit def optionStringToString(x : Option[String]) : String = x.getOrElse("")
val otherAccountNationalIdentifier = if(viewPermissions.exists(_ == "canSeeOtherAccountNationalIdentifier")) Some(otherBankAccount.nationalIdentifier) else None
val otherAccountSWIFT_BIC = if(viewPermissions.exists(_ == "canSeeOtherAccountSWIFT_BIC")) otherBankAccount.otherBankRoutingAddress else None
val otherAccountIBAN = if(viewPermissions.exists(_ == "canSeeOtherAccountIBAN")) otherBankAccount.otherAccountRoutingAddress else None
val otherAccountBankName = if(viewPermissions.exists(_ == "canSeeOtherAccountBankName")) Some(otherBankAccount.thisBankId.value) else None
val otherAccountNumber = if(viewPermissions.exists(_ == "canSeeOtherAccountNumber")) Some(otherBankAccount.thisAccountId.value) else None
val otherAccountKind = if(viewPermissions.exists(_ == "canSeeOtherAccountKind")) Some(otherBankAccount.kind) else None
val otherBankRoutingScheme = if(viewPermissions.exists(_ == "canSeeOtherBankRoutingScheme")) Some(otherBankAccount.otherBankRoutingScheme) else None
val otherBankRoutingAddress = if(viewPermissions.exists(_ == "canSeeOtherBankRoutingAddress")) otherBankAccount.otherBankRoutingAddress else None
val otherAccountRoutingScheme = if(viewPermissions.exists(_ == "canSeeOtherAccountRoutingScheme")) Some(otherBankAccount.otherAccountRoutingScheme) else None
val otherAccountRoutingAddress = if(viewPermissions.exists(_ == "canSeeOtherAccountRoutingAddress")) otherBankAccount.otherAccountRoutingAddress else None
val otherAccountNationalIdentifier = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER)) Some(otherBankAccount.nationalIdentifier) else None
val otherAccountSWIFT_BIC = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC)) otherBankAccount.otherBankRoutingAddress else None
val otherAccountIBAN = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN)) otherBankAccount.otherAccountRoutingAddress else None
val otherAccountBankName = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME)) Some(otherBankAccount.thisBankId.value) else None
val otherAccountNumber = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER)) Some(otherBankAccount.thisAccountId.value) else None
val otherAccountKind = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND)) Some(otherBankAccount.kind) else None
val otherBankRoutingScheme = if(viewPermissions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME)) Some(otherBankAccount.otherBankRoutingScheme) else None
val otherBankRoutingAddress = if(viewPermissions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS)) otherBankAccount.otherBankRoutingAddress else None
val otherAccountRoutingScheme = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME)) Some(otherBankAccount.otherAccountRoutingScheme) else None
val otherAccountRoutingAddress = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS)) otherBankAccount.otherAccountRoutingAddress else None
val otherAccountMetadata =
if(viewPermissions.exists(_ == "canSeeOtherAccountMetadata")){
if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA)){
//other bank account metadata
val moreInfo = moderateField(viewPermissions.exists(_ == "canSeeMoreInfo"), Counterparties.counterparties.vend.getMoreInfo(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val url = moderateField(viewPermissions.exists(_ == "canSeeUrl"), Counterparties.counterparties.vend.getUrl(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val imageUrl = moderateField(viewPermissions.exists(_ == "canSeeImageUrl"), Counterparties.counterparties.vend.getImageURL(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val openCorporatesUrl = moderateField (viewPermissions.exists(_ == "canSeeOpenCorporatesUrl"), Counterparties.counterparties.vend.getOpenCorporatesURL(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val corporateLocation : Option[Option[GeoTag]] = moderateField(viewPermissions.exists(_ == "canSeeCorporateLocation"), Counterparties.counterparties.vend.getCorporateLocation(otherBankAccount.counterpartyId).toOption)
val physicalLocation : Option[Option[GeoTag]] = moderateField(viewPermissions.exists(_ == "canSeePhysicalLocation"), Counterparties.counterparties.vend.getPhysicalLocation(otherBankAccount.counterpartyId).toOption)
val addMoreInfo = moderateField(viewPermissions.exists(_ == "canAddMoreInfo"), otherBankAccount.metadata.addMoreInfo)
val addURL = moderateField(viewPermissions.exists(_ == "canAddURL"), otherBankAccount.metadata.addURL)
val addImageURL = moderateField(viewPermissions.exists(_ == "canAddImageURL"), otherBankAccount.metadata.addImageURL)
val addOpenCorporatesUrl = moderateField(viewPermissions.exists(_ == "canAddOpenCorporatesUrl"), otherBankAccount.metadata.addOpenCorporatesURL)
val addCorporateLocation = moderateField(viewPermissions.exists(_ == "canAddCorporateLocation"), otherBankAccount.metadata.addCorporateLocation)
val addPhysicalLocation = moderateField(viewPermissions.exists(_ == "canAddPhysicalLocation"), otherBankAccount.metadata.addPhysicalLocation)
val publicAlias = moderateField(viewPermissions.exists(_ == "canSeePublicAlias"), Counterparties.counterparties.vend.getPublicAlias(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val privateAlias = moderateField(viewPermissions.exists(_ == "canSeePrivateAlias"), Counterparties.counterparties.vend.getPrivateAlias(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val addPublicAlias = moderateField(viewPermissions.exists(_ == "canAddPublicAlias"), otherBankAccount.metadata.addPublicAlias)
val addPrivateAlias = moderateField(viewPermissions.exists(_ == "canAddPrivateAlias"), otherBankAccount.metadata.addPrivateAlias)
val deleteCorporateLocation = moderateField(viewPermissions.exists(_ == "canDeleteCorporateLocation"), otherBankAccount.metadata.deleteCorporateLocation)
val deletePhysicalLocation= moderateField(viewPermissions.exists(_ == "canDeletePhysicalLocation"), otherBankAccount.metadata.deletePhysicalLocation)
val moreInfo = moderateField(viewPermissions.exists(_ == CAN_SEE_MORE_INFO), Counterparties.counterparties.vend.getMoreInfo(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val url = moderateField(viewPermissions.exists(_ == CAN_SEE_URL), Counterparties.counterparties.vend.getUrl(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val imageUrl = moderateField(viewPermissions.exists(_ == CAN_SEE_IMAGE_URL), Counterparties.counterparties.vend.getImageURL(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val openCorporatesUrl = moderateField (viewPermissions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL), Counterparties.counterparties.vend.getOpenCorporatesURL(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val corporateLocation : Option[Option[GeoTag]] = moderateField(viewPermissions.exists(_ == CAN_SEE_CORPORATE_LOCATION), Counterparties.counterparties.vend.getCorporateLocation(otherBankAccount.counterpartyId).toOption)
val physicalLocation : Option[Option[GeoTag]] = moderateField(viewPermissions.exists(_ == CAN_SEE_PHYSICAL_LOCATION), Counterparties.counterparties.vend.getPhysicalLocation(otherBankAccount.counterpartyId).toOption)
val addMoreInfo = moderateField(viewPermissions.exists(_ == CAN_ADD_MORE_INFO), otherBankAccount.metadata.addMoreInfo)
val addURL = moderateField(viewPermissions.exists(_ == CAN_ADD_URL), otherBankAccount.metadata.addURL)
val addImageURL = moderateField(viewPermissions.exists(_ == CAN_ADD_IMAGE_URL), otherBankAccount.metadata.addImageURL)
val addOpenCorporatesUrl = moderateField(viewPermissions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL), otherBankAccount.metadata.addOpenCorporatesURL)
val addCorporateLocation = moderateField(viewPermissions.exists(_ == CAN_ADD_CORPORATE_LOCATION), otherBankAccount.metadata.addCorporateLocation)
val addPhysicalLocation = moderateField(viewPermissions.exists(_ == CAN_ADD_PHYSICAL_LOCATION), otherBankAccount.metadata.addPhysicalLocation)
val publicAlias = moderateField(viewPermissions.exists(_ == CAN_SEE_PUBLIC_ALIAS), Counterparties.counterparties.vend.getPublicAlias(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val privateAlias = moderateField(viewPermissions.exists(_ == CAN_SEE_PRIVATE_ALIAS), Counterparties.counterparties.vend.getPrivateAlias(otherBankAccount.counterpartyId).getOrElse("Unknown"))
val addPublicAlias = moderateField(viewPermissions.exists(_ == CAN_ADD_PUBLIC_ALIAS), otherBankAccount.metadata.addPublicAlias)
val addPrivateAlias = moderateField(viewPermissions.exists(_ == CAN_ADD_PRIVATE_ALIAS), otherBankAccount.metadata.addPrivateAlias)
val deleteCorporateLocation = moderateField(viewPermissions.exists(_ == CAN_DELETE_CORPORATE_LOCATION), otherBankAccount.metadata.deleteCorporateLocation)
val deletePhysicalLocation= moderateField(viewPermissions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION), otherBankAccount.metadata.deletePhysicalLocation)
Some(
new ModeratedOtherBankAccountMetadata(
@ -589,8 +589,8 @@ case class ViewExtended(val view: View) {
def moderateCore(counterpartyCore : CounterpartyCore) : Box[ModeratedOtherBankAccountCore] = {
val viewPermissions = getViewPermissions
if (viewPermissions.exists(_ == "canSeeTransactionOtherBankAccount"))
if (viewPermissions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT))
{
//other account data
val otherAccountId = counterpartyCore.counterpartyId
@ -609,15 +609,15 @@ case class ViewExtended(val view: View) {
}
implicit def optionStringToString(x : Option[String]) : String = x.getOrElse("")
val otherAccountSWIFT_BIC = if(viewPermissions.exists(_ == "canSeeOtherAccountSWIFT_BIC")) counterpartyCore.otherBankRoutingAddress else None
val otherAccountIBAN = if(viewPermissions.exists(_ == "canSeeOtherAccountIBAN")) counterpartyCore.otherAccountRoutingAddress else None
val otherAccountBankName = if(viewPermissions.exists(_ == "canSeeOtherAccountBankName")) Some(counterpartyCore.thisBankId.value) else None
val otherAccountNumber = if(viewPermissions.exists(_ == "canSeeOtherAccountNumber")) Some(counterpartyCore.thisAccountId.value) else None
val otherAccountKind = if(viewPermissions.exists(_ == "canSeeOtherAccountKind")) Some(counterpartyCore.kind) else None
val otherBankRoutingScheme = if(viewPermissions.exists(_ == "canSeeOtherBankRoutingScheme")) Some(counterpartyCore.otherBankRoutingScheme) else None
val otherBankRoutingAddress = if(viewPermissions.exists(_ == "canSeeOtherBankRoutingAddress")) counterpartyCore.otherBankRoutingAddress else None
val otherAccountRoutingScheme = if(viewPermissions.exists(_ == "canSeeOtherAccountRoutingScheme")) Some(counterpartyCore.otherAccountRoutingScheme) else None
val otherAccountRoutingAddress = if(viewPermissions.exists(_ == "canSeeOtherAccountRoutingAddress")) counterpartyCore.otherAccountRoutingAddress else None
val otherAccountSWIFT_BIC = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC)) counterpartyCore.otherBankRoutingAddress else None
val otherAccountIBAN = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN)) counterpartyCore.otherAccountRoutingAddress else None
val otherAccountBankName = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME)) Some(counterpartyCore.thisBankId.value) else None
val otherAccountNumber = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER)) Some(counterpartyCore.thisAccountId.value) else None
val otherAccountKind = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND)) Some(counterpartyCore.kind) else None
val otherBankRoutingScheme = if(viewPermissions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME)) Some(counterpartyCore.otherBankRoutingScheme) else None
val otherBankRoutingAddress = if(viewPermissions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS)) counterpartyCore.otherBankRoutingAddress else None
val otherAccountRoutingScheme = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME)) Some(counterpartyCore.otherAccountRoutingScheme) else None
val otherAccountRoutingAddress = if(viewPermissions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS)) counterpartyCore.otherAccountRoutingAddress else None
Some(
new ModeratedOtherBankAccountCore(
id = counterpartyCore.counterpartyId,

View File

@ -655,7 +655,7 @@ object MapperViews extends Views with MdcLoggable {
permission.delete_!
// If the permission already exists and permissionValueFromViewDefinition is defined, we update the metadata.
case Full(permission) if permissionValueFromViewDefinition.isDefined =>
permission.metaData(permissionValueFromViewDefinition.get.mkString(",")).save
permission.extraData(permissionValueFromViewDefinition.get.mkString(",")).save
//if the permission is not existing in ViewPermission,but it is defined in the viewDefinition, we create it. --systemView
case Empty if (viewDefinition.isSystem && permissionValueFromViewDefinition.isDefined) =>
ViewPermission.create
@ -663,7 +663,7 @@ object MapperViews extends Views with MdcLoggable {
.account_id(null)
.view_id(viewDefinition.viewId.value)
.permission(permissionName)
.metaData(permissionValueFromViewDefinition.get.mkString(","))
.extraData(permissionValueFromViewDefinition.get.mkString(","))
.save
//if the permission is not existing in ViewPermission,but it is defined in the viewDefinition, we create it. --customView
case Empty if (!viewDefinition.isSystem && permissionValueFromViewDefinition.isDefined) =>
@ -672,7 +672,7 @@ object MapperViews extends Views with MdcLoggable {
.account_id(viewDefinition.accountId.value)
.view_id(viewDefinition.viewId.value)
.permission(permissionName)
.metaData(permissionValueFromViewDefinition.get.mkString(","))
.extraData(permissionValueFromViewDefinition.get.mkString(","))
.save
case _ =>
// This case should not happen, but if it does, we add an error log

View File

@ -1,5 +1,6 @@
package code.views.system
import code.api.Constant._
import code.api.util.APIUtil.{isValidCustomViewId, isValidSystemViewId}
import code.api.util.ErrorMessages.{CreateSystemViewError, InvalidCustomViewFormat, InvalidSystemViewFormat}
import code.util.{AccountIdString, UUIDString}
@ -364,99 +365,99 @@ class ViewDefinition extends View with LongKeyedMapper[ViewDefinition] with Many
val actions = viewData.allowed_actions
if (isSystem) { //The following are admin permissions, only system views are allowed to use them.
canGrantAccessToCustomViews_(actions.exists(_ == "can_grant_access_to_custom_views"))
canRevokeAccessToCustomViews_(actions.exists(_ == "can_revoke_access_to_custom_views"))
canGrantAccessToCustomViews_(actions.exists(_ == CAN_GRANT_ACCESS_TO_CUSTOM_VIEWS))
canRevokeAccessToCustomViews_(actions.exists(_ == CAN_REVOKE_ACCESS_TO_CUSTOM_VIEWS))
canGrantAccessToViews_(viewData.can_grant_access_to_views.getOrElse(Nil).mkString(","))
canRevokeAccessToViews_(viewData.can_revoke_access_to_views.getOrElse(Nil).mkString(","))
canCreateCustomView_(actions.exists(_ == "can_create_custom_view"))
canDeleteCustomView_(actions.exists(_ == "can_delete_custom_view"))
canUpdateCustomView_(actions.exists(_ == "can_update_custom_view"))
canCreateCustomView_(actions.exists(_ == CAN_CREATE_CUSTOM_VIEW))
canDeleteCustomView_(actions.exists(_ == CAN_DELETE_CUSTOM_VIEW))
canUpdateCustomView_(actions.exists(_ == CAN_UPDATE_CUSTOM_VIEW))
}
canSeeTransactionThisBankAccount_(actions.exists(_ =="can_see_transaction_this_bank_account"))
canSeeTransactionOtherBankAccount_(actions.exists(_ =="can_see_transaction_other_bank_account"))
canSeeTransactionMetadata_(actions.exists(_ == "can_see_transaction_metadata"))
canSeeTransactionDescription_(actions.exists(a => a == "can_see_transaction_label" || a == "can_see_transaction_description"))
canSeeTransactionAmount_(actions.exists(_ == "can_see_transaction_amount"))
canSeeTransactionType_(actions.exists(_ == "can_see_transaction_type"))
canSeeTransactionCurrency_(actions.exists(_ == "can_see_transaction_currency"))
canSeeTransactionStartDate_(actions.exists(_ == "can_see_transaction_start_date"))
canSeeTransactionFinishDate_(actions.exists(_ == "can_see_transaction_finish_date"))
canSeeTransactionBalance_(actions.exists(_ == "can_see_transaction_balance"))
canSeeComments_(actions.exists(_ == "can_see_comments"))
canSeeOwnerComment_(actions.exists(_ == "can_see_narrative"))
canSeeTags_(actions.exists(_ == "can_see_tags"))
canSeeImages_(actions.exists(_ == "can_see_images"))
canSeeBankAccountOwners_(actions.exists(_ == "can_see_bank_account_owners"))
canSeeBankAccountType_(actions.exists(_ == "can_see_bank_account_type"))
canSeeBankAccountBalance_(actions.exists(_ == "can_see_bank_account_balance"))
canQueryAvailableFunds_(actions.exists(_ == "can_query_available_funds"))
canSeeBankAccountCurrency_(actions.exists(_ == "can_see_bank_account_currency"))
canSeeBankAccountLabel_(actions.exists(_ == "can_see_bank_account_label"))
canSeeBankAccountNationalIdentifier_(actions.exists(_ == "can_see_bank_account_national_identifier"))
canSeeBankAccountSwift_bic_(actions.exists(_ == "can_see_bank_account_swift_bic"))
canSeeBankAccountIban_(actions.exists(_ == "can_see_bank_account_iban"))
canSeeBankAccountNumber_(actions.exists(_ == "can_see_bank_account_number"))
canSeeBankAccountBankName_(actions.exists(_ == "can_see_bank_account_bank_name"))
canSeeBankAccountBankPermalink_(actions.exists(_ == "can_see_bank_account_bank_permalink"))
canSeeBankRoutingScheme_(actions.exists(_ == "can_see_bank_routing_scheme"))
canSeeBankRoutingAddress_(actions.exists(_ == "can_see_bank_routing_address"))
canSeeBankAccountRoutingScheme_(actions.exists(_ == "can_see_bank_account_routing_scheme"))
canSeeBankAccountRoutingAddress_(actions.exists(_ == "can_see_bank_account_routing_address"))
canSeeOtherAccountNationalIdentifier_(actions.exists(_ == "can_see_other_account_national_identifier"))
canSeeOtherAccountSWIFT_BIC_(actions.exists(_ == "can_see_other_account_swift_bic"))
canSeeOtherAccountIBAN_(actions.exists(_ == "can_see_other_account_iban"))
canSeeOtherAccountBankName_(actions.exists(_ == "can_see_other_account_bank_name"))
canSeeOtherAccountNumber_(actions.exists(_ == "can_see_other_account_number"))
canSeeOtherAccountMetadata_(actions.exists(_ == "can_see_other_account_metadata"))
canSeeOtherAccountKind_(actions.exists(_ == "can_see_other_account_kind"))
canSeeOtherBankRoutingScheme_(actions.exists(_ == "can_see_other_bank_routing_scheme"))
canSeeOtherBankRoutingAddress_(actions.exists(_ == "can_see_other_bank_routing_address"))
canSeeOtherAccountRoutingScheme_(actions.exists(_ == "can_see_other_account_routing_scheme"))
canSeeOtherAccountRoutingAddress_(actions.exists(_ == "can_see_other_account_routing_address"))
canSeeMoreInfo_(actions.exists(_ == "can_see_more_info"))
canSeeUrl_(actions.exists(_ == "can_see_url"))
canSeeImageUrl_(actions.exists(_ == "can_see_image_url"))
canSeeOpenCorporatesUrl_(actions.exists(_ == "can_see_open_corporates_url"))
canSeeCorporateLocation_(actions.exists(_ == "can_see_corporate_location"))
canSeePhysicalLocation_(actions.exists(_ == "can_see_physical_location"))
canSeePublicAlias_(actions.exists(_ == "can_see_public_alias"))
canSeePrivateAlias_(actions.exists(_ == "can_see_private_alias"))
canAddMoreInfo_(actions.exists(_ == "can_add_more_info"))
canAddURL_(actions.exists(_ == "can_add_url"))
canAddImageURL_(actions.exists(_ == "can_add_image_url"))
canAddOpenCorporatesUrl_(actions.exists(_ == "can_add_open_corporates_url"))
canAddCorporateLocation_(actions.exists(_ == "can_add_corporate_location"))
canAddPhysicalLocation_(actions.exists(_ == "can_add_physical_location"))
canAddPublicAlias_(actions.exists(_ == "can_add_public_alias"))
canAddPrivateAlias_(actions.exists(_ == "can_add_private_alias"))
canAddCounterparty_(actions.exists(_ == "can_add_counterparty"))
canDeleteCounterparty_(actions.exists(_ == "can_delete_counterparty"))
canGetCounterparty_(actions.exists(_ == "can_get_counterparty"))
canDeleteCorporateLocation_(actions.exists(_ == "can_delete_corporate_location"))
canDeletePhysicalLocation_(actions.exists(_ == "can_delete_physical_location"))
canEditOwnerComment_(actions.exists(_ == "can_edit_narrative"))
canAddComment_(actions.exists(_ == "can_add_comment"))
canDeleteComment_(actions.exists(_ == "can_delete_comment"))
canAddTag_(actions.exists(_ == "can_add_tag"))
canDeleteTag_(actions.exists(_ == "can_delete_tag"))
canAddImage_(actions.exists(_ == "can_add_image"))
canDeleteImage_(actions.exists(_ == "can_delete_image"))
canAddWhereTag_(actions.exists(_ == "can_add_where_tag"))
canSeeWhereTag_(actions.exists(_ == "can_see_where_tag"))
canDeleteWhereTag_(actions.exists(_ == "can_delete_where_tag"))
canAddTransactionRequestToBeneficiary_(actions.exists(_ == "can_add_transaction_request_to_beneficiary"))
canAddTransactionRequestToAnyAccount_(actions.exists(_ == "can_add_transaction_request_to_any_account"))
canSeeBankAccountCreditLimit_(actions.exists(_ == "can_see_bank_account_credit_limit"))
canCreateDirectDebit_(actions.exists(_ == "can_create_direct_debit"))
canCreateStandingOrder_(actions.exists(_ == "can_create_standing_order"))
canSeeTransactionRequests_(actions.exists(_ == "can_see_transaction_requests"))
canSeeTransactionRequestTypes_(actions.exists(_ == "can_see_transaction_request_types"))
canUpdateBankAccountLabel_(actions.exists(_ == "can_update_bank_account_label"))
canSeeAvailableViewsForBankAccount_(actions.exists(_ == "can_see_available_views_for_bank_account"))
canSeeViewsWithPermissionsForAllUsers_(actions.exists(_ == "can_see_views_with_permissions_for_all_users"))
canSeeViewsWithPermissionsForOneUser_(actions.exists(_ == "can_see_views_with_permissions_for_one_user"))
canSeeTransactionStatus_(actions.exists(_ == "can_see_transaction_status"))
canSeeTransactionThisBankAccount_(actions.exists(_ == CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT))
canSeeTransactionOtherBankAccount_(actions.exists(_ == CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT))
canSeeTransactionMetadata_(actions.exists(_ == CAN_SEE_TRANSACTION_METADATA))
canSeeTransactionDescription_(actions.exists(_ ==CAN_SEE_TRANSACTION_DESCRIPTION))
canSeeTransactionAmount_(actions.exists(_ == CAN_SEE_TRANSACTION_AMOUNT))
canSeeTransactionType_(actions.exists(_ == CAN_SEE_TRANSACTION_TYPE))
canSeeTransactionCurrency_(actions.exists(_ == CAN_SEE_TRANSACTION_CURRENCY))
canSeeTransactionStartDate_(actions.exists(_ == CAN_SEE_TRANSACTION_START_DATE))
canSeeTransactionFinishDate_(actions.exists(_ == CAN_SEE_TRANSACTION_FINISH_DATE))
canSeeTransactionBalance_(actions.exists(_ == CAN_SEE_TRANSACTION_BALANCE))
canSeeComments_(actions.exists(_ == CAN_SEE_COMMENTS))
canSeeOwnerComment_(actions.exists(_ == CAN_SEE_OWNER_COMMENT))
canSeeTags_(actions.exists(_ == CAN_SEE_TAGS))
canSeeImages_(actions.exists(_ == CAN_SEE_IMAGES))
canSeeBankAccountOwners_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_OWNERS))
canSeeBankAccountType_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_TYPE))
canSeeBankAccountBalance_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BALANCE))
canQueryAvailableFunds_(actions.exists(_ == CAN_QUERY_AVAILABLE_FUNDS))
canSeeBankAccountCurrency_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CURRENCY))
canSeeBankAccountLabel_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_LABEL))
canSeeBankAccountNationalIdentifier_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER))
canSeeBankAccountSwift_bic_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_SWIFT_BIC))
canSeeBankAccountIban_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_IBAN))
canSeeBankAccountNumber_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_NUMBER))
canSeeBankAccountBankName_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_NAME))
canSeeBankAccountBankPermalink_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_BANK_PERMALINK))
canSeeBankRoutingScheme_(actions.exists(_ == CAN_SEE_BANK_ROUTING_SCHEME))
canSeeBankRoutingAddress_(actions.exists(_ == CAN_SEE_BANK_ROUTING_ADDRESS))
canSeeBankAccountRoutingScheme_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_SCHEME))
canSeeBankAccountRoutingAddress_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_ROUTING_ADDRESS))
canSeeOtherAccountNationalIdentifier_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER))
canSeeOtherAccountSWIFT_BIC_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC))
canSeeOtherAccountIBAN_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_IBAN))
canSeeOtherAccountBankName_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_BANK_NAME))
canSeeOtherAccountNumber_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_NUMBER))
canSeeOtherAccountMetadata_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_METADATA))
canSeeOtherAccountKind_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_KIND))
canSeeOtherBankRoutingScheme_(actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_SCHEME))
canSeeOtherBankRoutingAddress_(actions.exists(_ == CAN_SEE_OTHER_BANK_ROUTING_ADDRESS))
canSeeOtherAccountRoutingScheme_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_SCHEME))
canSeeOtherAccountRoutingAddress_(actions.exists(_ == CAN_SEE_OTHER_ACCOUNT_ROUTING_ADDRESS))
canSeeMoreInfo_(actions.exists(_ == CAN_SEE_MORE_INFO))
canSeeUrl_(actions.exists(_ == CAN_SEE_URL))
canSeeImageUrl_(actions.exists(_ == CAN_SEE_IMAGE_URL))
canSeeOpenCorporatesUrl_(actions.exists(_ == CAN_SEE_OPEN_CORPORATES_URL))
canSeeCorporateLocation_(actions.exists(_ == CAN_SEE_CORPORATE_LOCATION))
canSeePhysicalLocation_(actions.exists(_ == CAN_SEE_PHYSICAL_LOCATION))
canSeePublicAlias_(actions.exists(_ == CAN_SEE_PUBLIC_ALIAS))
canSeePrivateAlias_(actions.exists(_ == CAN_SEE_PRIVATE_ALIAS))
canAddMoreInfo_(actions.exists(_ == CAN_ADD_MORE_INFO))
canAddURL_(actions.exists(_ == CAN_ADD_URL))
canAddImageURL_(actions.exists(_ == CAN_ADD_IMAGE_URL))
canAddOpenCorporatesUrl_(actions.exists(_ == CAN_ADD_OPEN_CORPORATES_URL))
canAddCorporateLocation_(actions.exists(_ == CAN_ADD_CORPORATE_LOCATION))
canAddPhysicalLocation_(actions.exists(_ == CAN_ADD_PHYSICAL_LOCATION))
canAddPublicAlias_(actions.exists(_ == CAN_ADD_PUBLIC_ALIAS))
canAddPrivateAlias_(actions.exists(_ == CAN_ADD_PRIVATE_ALIAS))
canAddCounterparty_(actions.exists(_ == CAN_ADD_COUNTERPARTY))
canDeleteCounterparty_(actions.exists(_ == CAN_DELETE_COUNTERPARTY))
canGetCounterparty_(actions.exists(_ == CAN_GET_COUNTERPARTY))
canDeleteCorporateLocation_(actions.exists(_ == CAN_DELETE_CORPORATE_LOCATION))
canDeletePhysicalLocation_(actions.exists(_ == CAN_DELETE_PHYSICAL_LOCATION))
canEditOwnerComment_(actions.exists(_ == CAN_EDIT_OWNER_COMMENT))
canAddComment_(actions.exists(_ == CAN_ADD_COMMENT))
canDeleteComment_(actions.exists(_ == CAN_DELETE_COMMENT))
canAddTag_(actions.exists(_ == CAN_ADD_TAG))
canDeleteTag_(actions.exists(_ == CAN_DELETE_TAG))
canAddImage_(actions.exists(_ == CAN_ADD_IMAGE))
canDeleteImage_(actions.exists(_ == CAN_DELETE_IMAGE))
canAddWhereTag_(actions.exists(_ == CAN_ADD_WHERE_TAG))
canSeeWhereTag_(actions.exists(_ == CAN_SEE_WHERE_TAG))
canDeleteWhereTag_(actions.exists(_ == CAN_DELETE_WHERE_TAG))
canAddTransactionRequestToBeneficiary_(actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_BENEFICIARY))
canAddTransactionRequestToAnyAccount_(actions.exists(_ == CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT))
canSeeBankAccountCreditLimit_(actions.exists(_ == CAN_SEE_BANK_ACCOUNT_CREDIT_LIMIT))
canCreateDirectDebit_(actions.exists(_ == CAN_CREATE_DIRECT_DEBIT))
canCreateStandingOrder_(actions.exists(_ == CAN_CREATE_STANDING_ORDER))
canSeeTransactionRequests_(actions.exists(_ == CAN_SEE_TRANSACTION_REQUESTS))
canSeeTransactionRequestTypes_(actions.exists(_ == CAN_SEE_TRANSACTION_REQUEST_TYPES))
canUpdateBankAccountLabel_(actions.exists(_ == CAN_UPDATE_BANK_ACCOUNT_LABEL))
canSeeAvailableViewsForBankAccount_(actions.exists(_ == CAN_SEE_AVAILABLE_VIEWS_FOR_BANK_ACCOUNT))
canSeeViewsWithPermissionsForAllUsers_(actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ALL_USERS))
canSeeViewsWithPermissionsForOneUser_(actions.exists(_ == CAN_SEE_VIEWS_WITH_PERMISSIONS_FOR_ONE_USER))
canSeeTransactionStatus_(actions.exists(_ == CAN_SEE_TRANSACTION_STATUS))
}

View File

@ -12,9 +12,9 @@ class ViewPermission extends LongKeyedMapper[ViewPermission] with IdPK with Crea
object view_id extends UUIDString(this)
object permission extends MappedString(this, 255)
//this is for special permissions like "canRevokeAccessToViews" and "canGrantAccessToViews", it will be a list of view ids ,
// eg: owner,auditor,accountant,firehose,standard,StageOne,ManageCustomViews,ReadAccountsBasic,ReadAccountsDetail,ReadBalances,ReadTransactionsBasic,ReadTransactionsDebits,
object metaData extends MappedString(this, 1024)
//this is for special permissions like CAN_REVOKE_ACCESS_TO_VIEWS and CAN_GRANT_ACCESS_TO_VIEWS, it will be a list of view ids ,
// eg: owner,auditor,accountant,firehose,standard,StageOne,ManageCustomViews,ReadAccountsBasic
object extraData extends MappedString(this, 1024)
}
object ViewPermission extends ViewPermission with LongKeyedMetaMapper[ViewPermission] {
override def dbIndexes: List[BaseIndex[ViewPermission]] = UniqueIndex(bank_id, account_id, view_id, permission) :: super.dbIndexes

File diff suppressed because it is too large Load Diff

View File

@ -48,25 +48,65 @@ class API1_2_1Test extends ServerSetupWithTestData with DefaultUsers with Privat
def v1_2_1Request = baseRequest / "obp" / "v1.2.1"
val viewFields = List(
"can_see_transaction_this_bank_account","can_see_transaction_other_bank_account",
"can_see_transaction_metadata","can_see_transaction_label","can_see_transaction_amount",
"can_see_transaction_type","can_see_transaction_currency","can_see_transaction_start_date",
"can_see_transaction_finish_date","can_see_transaction_balance","can_see_comments",
"can_see_narrative","can_see_tags","can_see_images","can_see_bank_account_owners",
"can_see_bank_account_type","can_see_bank_account_balance","can_see_bank_account_currency",
"can_see_bank_account_label","can_see_bank_account_national_identifier",
"can_see_bank_account_swift_bic","can_see_bank_account_iban","can_see_bank_account_number",
"can_see_bank_account_bank_name","can_see_other_account_national_identifier",
"can_see_other_account_swift_bic","can_see_other_account_iban",
"can_see_other_account_bank_name","can_see_other_account_number",
"can_see_other_account_metadata","can_see_other_account_kind","can_see_more_info",
"can_see_url","can_see_image_url","can_see_open_corporates_url","can_see_corporate_location",
"can_see_physical_location","can_see_public_alias","can_see_private_alias","can_add_more_info",
"can_add_url","can_add_image_url","can_add_open_corporates_url","can_add_corporate_location",
"can_add_physical_location","can_add_public_alias","can_add_private_alias",
"can_delete_corporate_location","can_delete_physical_location","can_edit_narrative",
"can_add_comment","can_delete_comment","can_add_tag","can_delete_tag","can_add_image",
"can_delete_image","can_add_where_tag","can_see_where_tag","can_delete_where_tag"
CAN_SEE_TRANSACTION_THIS_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_OTHER_BANK_ACCOUNT,
CAN_SEE_TRANSACTION_METADATA,
CAN_SEE_TRANSACTION_DESCRIPTION,
CAN_SEE_TRANSACTION_AMOUNT,
CAN_SEE_TRANSACTION_TYPE,
CAN_SEE_TRANSACTION_CURRENCY,
CAN_SEE_TRANSACTION_START_DATE,
CAN_SEE_TRANSACTION_FINISH_DATE,
CAN_SEE_TRANSACTION_BALANCE,
CAN_SEE_COMMENTS,
CAN_SEE_OWNER_COMMENT,
CAN_SEE_TAGS,
CAN_SEE_IMAGES,
CAN_SEE_BANK_ACCOUNT_OWNERS,
CAN_SEE_BANK_ACCOUNT_TYPE,
CAN_SEE_BANK_ACCOUNT_BALANCE,
CAN_SEE_BANK_ACCOUNT_CURRENCY,
CAN_SEE_BANK_ACCOUNT_LABEL,
CAN_SEE_BANK_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_BANK_ACCOUNT_SWIFT_BIC,
CAN_SEE_BANK_ACCOUNT_IBAN,
CAN_SEE_BANK_ACCOUNT_NUMBER,
CAN_SEE_BANK_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NATIONAL_IDENTIFIER,
CAN_SEE_OTHER_ACCOUNT_SWIFT_BIC,
CAN_SEE_OTHER_ACCOUNT_IBAN,
CAN_SEE_OTHER_ACCOUNT_BANK_NAME,
CAN_SEE_OTHER_ACCOUNT_NUMBER,
CAN_SEE_OTHER_ACCOUNT_METADATA,
CAN_SEE_OTHER_ACCOUNT_KIND,
CAN_SEE_MORE_INFO,
CAN_SEE_URL,
CAN_SEE_IMAGE_URL,
CAN_SEE_OPEN_CORPORATES_URL,
CAN_SEE_CORPORATE_LOCATION,
CAN_SEE_PHYSICAL_LOCATION,
CAN_SEE_PUBLIC_ALIAS,
CAN_SEE_PRIVATE_ALIAS,
CAN_ADD_MORE_INFO,
CAN_ADD_URL,
CAN_ADD_IMAGE_URL,
CAN_ADD_OPEN_CORPORATES_URL,
CAN_ADD_CORPORATE_LOCATION,
CAN_ADD_PHYSICAL_LOCATION,
CAN_ADD_PUBLIC_ALIAS,
CAN_ADD_PRIVATE_ALIAS,
CAN_DELETE_CORPORATE_LOCATION,
CAN_DELETE_PHYSICAL_LOCATION,
CAN_EDIT_OWNER_COMMENT,
CAN_ADD_COMMENT,
CAN_DELETE_COMMENT,
CAN_ADD_TAG,
CAN_DELETE_TAG,
CAN_ADD_IMAGE,
CAN_DELETE_IMAGE,
CAN_ADD_WHERE_TAG,
CAN_SEE_WHERE_TAG,
CAN_DELETE_WHERE_TAG
)
/************************* test tags ************************/