Tuesday, November 9, 2010

Access Security Context object from Model and View Layer

Requirement :- I want to bind the query with current login user id and filter the vo object based on roles.

Following context object is provided by oracle that can be
used on view controller

#{securityContext.userName}
#{securityContext.userInRole['roleList']}
#{securityContext.userInAllRoles['roleList']}
#{securityContext.userGrantedPermission['permission']}
#{securityContext.taskflowViewable['target']}
#{securityContext.regionViewable['target']}

Following groovy object can be used to get username

adf.context.securityContext.userName

1 comment:

  1. How to get first and last name from securitycontext EL?
    is that possible?

    ReplyDelete