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

Auslagern von Authority Strings #420

Open
vjohnslhm opened this issue Sep 18, 2024 · 2 comments
Open

Auslagern von Authority Strings #420

vjohnslhm opened this issue Sep 18, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@vjohnslhm
Copy link
Contributor

vjohnslhm commented Sep 18, 2024

Dies Auslagerung an sich gefällt mir und wäre zu überlegen auch auf die anderen Services zu übernehmen.

Originally posted by @MrSebastian in #412 (comment)

Beispiel

String AUTHORITY_WRITE_EREIGNIS = "hasAuthority('VorfaelleUndVorkommnisse_WRITE_Ereignisse')";
@PreAuthorize(AUTHORITY_WRITE_EREIGNIS)

statt

@PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_WRITE_Ereignisse')")

Beschreibung

Das Auslagern der AuthorityStrings hätte folgende Vor- und Nachteile die mir einfallen:

+ -
Wiederverwendbarkeit mehr Codezeilen
bessere Lesbarkeit
Reduzierung von Errors durch Tippfehler
@MrSebastian
Copy link
Member

Entscheidung

  • bleibt bei Vorgehen: @PreAuthorize("hasAuthority('VorfaelleUndVorkommnisse_WRITE_Ereignisse')")
    • keine gesonderten Konstanten
  • Update doku

@MrSebastian MrSebastian removed the discussion we have to talk and decide label Sep 23, 2024
@MrSebastian MrSebastian added this to the Phase 1 - Backend milestone Sep 23, 2024
@MrSebastian MrSebastian added the documentation Improvements or additions to documentation label Sep 23, 2024
@Nic12345678
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants