Grants read-only access to fraud prevention: which rules are in force, and what has been scored. Applies to the same resources as FraudManagerRole but without write access. It is worth having as its own role rather than folding into the manager role because the two audiences differ: the people who need to look at a blocked order, such as support or finance staff, are usually not the people who should be able to move the threshold that blocked it.
Implements: Role
Properties
| Property | Returns | Description |
|---|---|---|
| category | String | The group this role is listed under in the role picker. |
| description | String | A short, human-readable summary of what this role grants, shown in the role picker. |
| name | String | This role's registered name, "FraudViewer". |
Inherited from Role
Methods
canConnectToOrganisation()
Returns: boolean
Convenience method for callers, such as Velocity templates, which just need to know if this role can be assigned within an organisation context, without dealing with the TargetType enum directly.
canConnectToRepository()
Returns: boolean
Convenience method for callers, such as Velocity templates, which just need to know if this role can be assigned within a repository (or website) context, without dealing with the TargetType enum directly.
Methods
getName()
Returns: String
This role's registered name, "FraudViewer".
appliesTo(CommonResource resource, Repository applicableRepo, Group g)
Returns: boolean
Fraud prevention is scoped to an account, not to a website's repository, so a repository-scoped grant never applies.
| Parameter | Description |
|---|---|
resource | the resource being checked |
applicableRepo | the repository the grant is scoped to |
g | the group the grant came from |
getPriviledges(CommonResource resource, Repository applicableRepo, Group g)
Returns: Set<Priviledge>
Never reached: this role does not apply to repository-scoped grants. Returns nothing rather than a privilege, so that a future caller cannot accidentally read a grant out of it.
| Parameter | Description |
|---|---|
resource | the resource being checked |
applicableRepo | the repository the grant is scoped to |
g | the group the grant came from |
getDescription()
Returns: String
A short, human-readable summary of what this role grants, shown in the role picker.
getCategory()
Returns: String
The group this role is listed under in the role picker.
canConnectTo(TargetType type)
Returns: boolean
Organisation only. Offering a repository-scoped grant would put a control in the group editor that silently does nothing, because the repository-scoped appliesTo overload never matches.
| Parameter | Description |
|---|---|
type | the target a group is being connected to |