You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to get current user security information in groovy

edited Jan 29, 2021 1:56PM in Planning 2 comments

Summary

We want to maintain Data Form row/column access based on the user Role

Content

Hello Groovy experts,

We have business use case where certain rows need to be read-only based on the user access (Role/Group/Name)

We don't want to use member security as our requirement depend on the dimension which is not enabled for security.

===========================

I come across the API commands, but we can't use these methods directly in groovy script

// Get the security context
def secCtx = adf.context.getSecurityContext()
// Check if user has a given role
if (secCtx.isUserInRole('MyAppRole')) {
// get the current user's name

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!