DStageWrapper for extracting user/role/project
Posted: Wed Mar 13, 2019 4:23 am
Hello,
I'm currently trying to export witha command line the permissions of a project/list of projects.
I found here a beautifull command line :
DStageWrapper.sh -user myUser-password myPas -query "select x.principalId,a.contextId from x in ASCLModel::User, y in x->has_SystemRole, z in x->assignedBy_RoleAssignment, a in z->has_RoleContext, b in a->defines_RoleAssignment, c in b->definedBy_SystemRole where y.roleId = 'DataStageUser''"
I tried this and thought it was working fine.... but no, it gives me a wrong list. It gives me for one user all possible roles. I mean for user1, i get :
user1 developer
user1 operator
user1 superOperator
Even if this user is only operator on the project.
I tried and this is this part of the query which is making a cross join :
b in a->defines_RoleAssignment
Any one has an idea how to fix this query ? Or perhaps you have a better way to extract the permissions and roles for a project.
Thanks for your help on this one ! the documentation of DStageWrapper is almost ... inexistant.
I'm currently trying to export witha command line the permissions of a project/list of projects.
I found here a beautifull command line :
DStageWrapper.sh -user myUser-password myPas -query "select x.principalId,a.contextId from x in ASCLModel::User, y in x->has_SystemRole, z in x->assignedBy_RoleAssignment, a in z->has_RoleContext, b in a->defines_RoleAssignment, c in b->definedBy_SystemRole where y.roleId = 'DataStageUser''"
I tried this and thought it was working fine.... but no, it gives me a wrong list. It gives me for one user all possible roles. I mean for user1, i get :
user1 developer
user1 operator
user1 superOperator
Even if this user is only operator on the project.
I tried and this is this part of the query which is making a cross join :
b in a->defines_RoleAssignment
Any one has an idea how to fix this query ? Or perhaps you have a better way to extract the permissions and roles for a project.
Thanks for your help on this one ! the documentation of DStageWrapper is almost ... inexistant.