Skip to main content

[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-48) @CurrentUser

  • From: "mkarg (JIRA)" < >
  • To:
  • Subject: [jpa-spec issues] [JIRA] Commented: (JPA_SPEC-48) @CurrentUser
  • Date: Tue, 22 Apr 2014 12:54:49 +0000 (UTC)
  • Auto-submitted: auto-generated


    [ 
https://java.net/jira/browse/JPA_SPEC-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=374674#action_374674
 ] 

mkarg commented on JPA_SPEC-48:
-------------------------------

Arjan, you can inject the current security principal into any CDI beand and 
EJB. So you have that there already. My proposal is focused on JPA because 
you cannot inject the security principal into a JPA entity.

> @CurrentUser
> ------------
>
>                 Key: JPA_SPEC-48
>                 URL: https://java.net/jira/browse/JPA_SPEC-48
>             Project: jpa-spec
>          Issue Type: Sub-task
>            Reporter: mkarg
>            Assignee: ldemichiel
>
> New annotation "@CurrentUser" should inject the current user into a data 
> field (this is what databases do with the CURRENT USER constraint).
> As in the Java EE environment there is a difference between security 
> principals, business layer people, and database accounts, there should be a 
> mapping available. For example "@CurrentUser(type = PRINCIPAL_NAME) String 
> createdBy" would default the content of "createdBy" to the name of the 
> caller principal's name. This is the most common need for automatic values 
> in business applications.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-48) @CurrentUser

mkarg (JIRA) 04/22/2014
 
 
Close
loading
Please Confirm
Close