Skip to content

Allow @Indexed to be used as meta-annotation [DATAMONGO-1163] #2081

@spring-projects-issues

Description

@spring-projects-issues

Jordi Llach Fernandez opened DATAMONGO-1163 and commented

Part of the security infrastructure that we have built depends on the values of a certain field of our @Document objects.

Sample field definition below

@Field("AS_COMMERCI") @AuthorizationAccessField @Indexed
private List<Category> commercial;

At runtime this field is added to the query and filled with values based on business logic and user privileges

Therefore this field is vastly used in our queries and it would be useful if we could just modify our @AuthorizationAccessField in order to be @Indexed internally (as we already do with @JsonIgnore)

@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@JsonIgnore
@Inherited
public @interface AuthorizationAccessField {
 ....
}

Referenced from: pull request #325, and commits bce6e2c, b5ea0ec

1 votes, 3 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions