mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:27:01 +00:00
feature/Add two new permissions to View Definition
This commit is contained in:
parent
8ac20cfe47
commit
7cd419490f
@ -49,6 +49,12 @@ class ViewDefinition extends View with LongKeyedMapper[ViewDefinition] with Many
|
||||
object hideOtherAccountMetadataIfAlias_ extends MappedBoolean(this){
|
||||
override def defaultValue = false
|
||||
}
|
||||
object canGrantAccessToViews_ extends MappedText(this){
|
||||
override def defaultValue = ""
|
||||
}
|
||||
object canRevokeAccessToViews_ extends MappedText(this){
|
||||
override def defaultValue = ""
|
||||
}
|
||||
object canSeeTransactionThisBankAccount_ extends MappedBoolean(this){
|
||||
override def defaultValue = false
|
||||
}
|
||||
@ -303,6 +309,9 @@ class ViewDefinition extends View with LongKeyedMapper[ViewDefinition] with Many
|
||||
isPublic_(viewData.is_public)
|
||||
isFirehose_(viewData.is_firehose.getOrElse(false))
|
||||
metadataView_(viewData.metadata_view)
|
||||
|
||||
canGrantAccessToViews_(viewData.can_grant_access_to_views.getOrElse(Nil).mkString(","))
|
||||
canRevokeAccessToViews_(viewData.can_revoke_access_to_views.getOrElse(Nil).mkString(","))
|
||||
|
||||
val actions = viewData.allowed_actions
|
||||
|
||||
@ -408,6 +417,9 @@ class ViewDefinition extends View with LongKeyedMapper[ViewDefinition] with Many
|
||||
def usePublicAliasIfOneExists: Boolean = usePublicAliasIfOneExists_.get
|
||||
def hideOtherAccountMetadataIfAlias: Boolean = hideOtherAccountMetadataIfAlias_.get
|
||||
|
||||
def canGrantAccessToViews : List[String] = canGrantAccessToViews_.get.split(",").toList.map(_.trim)
|
||||
def canRevokeAccessToViews : List[String] = canRevokeAccessToViews_.get.split(",").toList.map(_.trim)
|
||||
|
||||
//reading access
|
||||
|
||||
//transaction fields
|
||||
|
||||
@ -52,6 +52,8 @@ trait ViewSpecification {
|
||||
def which_alias_to_use: String
|
||||
def hide_metadata_if_alias_used: Boolean
|
||||
def allowed_actions : List[String]
|
||||
def can_grant_access_to_views : Option[List[String]] = None
|
||||
def can_revoke_access_to_views : Option[List[String]] = None
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user