Sign In   Register
  Tuesday, 29 March 2022
  2 Replies
  72 Visits
0
Votes
Undo
  Subscribe
I'm trying to bulk remove users from a portal. In the absence of a fluent api I'm trying

portal.removeFromPortalUsers(portaluser)

and

user.removeFromPortalUsers(portaluser)

in both cases I'm getting an error which only differs depending on what object is calling the method. In the case of portal I get:

[v.3.1 Sep 20 2014 14:06:21] Validation failures: Validation failure for com.avoka.fc.core.entity.PortalUser.portal: \"portal\" is required.

and invoking on user I get:

[v.3.1 Sep 20 2014 14:06:21] Validation failures: Validation failure for com.avoka.fc.core.entity.PortalUser.user: \"user\" is required.

Is there a way around this?

Full code below:


portal = new com.avoka.fc.core.dao.PortalDao().getPortalByName('My Portal')
users = portal.getPortalUsers()
outsiders = users.findAll { ! it.getUser().isActive() }

outsiders.each { pu ->
u = pu.getUser()
u.removeFromPortalUsers(pu)
}
1 month ago
·
#14333
0
Votes
Undo
Thank you for the clarification. I have passed it on to the engineering team.
1 month ago
·
#14332
0
Votes
Undo
Hi Matthew,
We will pass it to the technical team.

I understand you are trying to remove already deactivated users. Could the script fail if a user is not local, e.g. LDAP user?

There is some info about how to bulk add users, maybe it's good to read it as well https://docs.avoka.com/Users/BulkImportUserAccounts.htm

Regards,
  • Page :
  • 1
There are no replies made for this post yet.
Be one of the first to reply to this post!

Q&A Forum - Tips

The purpose of the Temenos Journey Manager platform (TJM) Q&A forum is for all clients and partners to seek help...

Read More

Not a member?

Register to ask a question and access to more content.

Join now

Looking for something else?

You can request access to:

  • Courses
  • Full Release Notes
  • Product Downloads
  • SDK

Request access

Leader Board

1
Mark Murray
User's Points: 1376
2
Lin Vanoevelen
User's Points: 1046
3
Julio Berrueco Pinto
User's Points: 715
4
Matthew White
User's Points: 398
5
Chad Thomas
User's Points: 300