Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROLE_ prefix proposition breaks with custom prefixes #2

Open
SrMouraSilva opened this issue Nov 19, 2019 · 0 comments
Open

ROLE_ prefix proposition breaks with custom prefixes #2

SrMouraSilva opened this issue Nov 19, 2019 · 0 comments

Comments

@SrMouraSilva
Copy link

If a user customize the authority mapper, the system does not detect any permissions

val grantedAuthorityMapper = SimpleAuthorityMapper()
// Ignore ROLE_ prefix
grantedAuthorityMapper.setPrefix("")

The source of the problem is this source code, which assumes that rules will always be prefixed with ROLE.

https://github.com/JahnelGroup/jackson-field-security/blob/b12d323/src/main/kotlin/com/jahnelgroup/jackson/security/policy/RoleBasedFieldSecurityPolicy.kt#L19-L21

In my code, just take this automatic insertion to work

@SrMouraSilva SrMouraSilva changed the title No permDoesn't works if the user ROLE_ prefix proposition breaks with custom prefixes Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant