Hi ivyteam

In my project, i have the role name Front RM and i assign some users for it. Then some version later i rename that role to FrontRM (remove space). That mean all users will be mapped to FrontRM

Now i use ivy.session.getSessionUser().getRoles() but it always say that user has two roles Front RM and FrontRM.

I've investigated then see that there still remain old mapping between user and old role. That's mean when i rename a role, ivy actually add a new role with new name and keep old one with mapping. I explained in this picture: alt text

Some questions:

  1. Why ivy still keep old role + old mapping? it's because of multiple PMVs? But in case there is only one PMVs so could ivy remove unnecessary role completely?
  2. Does api ivy.session.getSessionUser().getRoles() return correct roles as it display on Admin Tool? If not can i base on any flag to remove that inactive role?


asked 19.04.2018 at 07:03

trungdv's gravatar image

accept rate: 52%

edited 19.04.2018 at 07:06

Hello @trungdv

If you only change the Display Name of the role, then you would not have any problems. In your case I assume that you manually modified the roles.roleconfig file?

1) Because you manually changed the identifier of the role. Ivy does not know the "old" role - it can not be properly merged with your new role. You can manually delete this role via API ch.ivyteam.ivy.security.IRole.delete() -> assigned task to this role are unassigned afterwards.

2) ivy.session.getSessionUser().getRoles() returns all roles. In the admin ui you only see the active roles as default. You can change that if you click on Display obsolete Roles at the bottom. You only can figure out if a role is active via the API ch.ivyteam.ivy.security.ISecurityContext.getActiveRoles().


answered 23.04.2018 at 03:44

Alex%20Suter's gravatar image

Alex Suter ♦♦
accept rate: 83%

hi @Alex Suter ♦♦

Thanks for your response

1) i delete role from role editor in designer then redeploy application.

2) I'll use that API to get active roles

(23.04.2018 at 21:23) trungdv trungdv's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 19.04.2018 at 07:03

Seen: 189 times

Last updated: 23.04.2018 at 21:23