Tuesday, July 19, 2011

OBIEE11g / WLST Adding Users to a Group

Posted this one on my WLST blog:

#
# Adding Users to a Group using WLST (online)
# John Minkjan Ciber Netherlands
#
print 'lookup DefaultAuthenticator'
atnr=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider('DefaultAuthenticator')

groups = ['companya','BIConsumers','BIAuthors']
for group in groups:
    users = ['user1','user2']
    for user in users:       
        print 'working user: ',user, ' group:', group
        try:
            atnr.addMemberToGroup(group,user)
        except:
            print 'user: ', user , ' can not be placed in group: ', group

Till Next Time

No comments: