Hi every body, I used ivy API createChildRole(...) to create a new child role of an existed role, but I checked and known that the new role is not active (by calling method SecurityContext.getActiveRoles() to return a list of active roles, but the new role was not included in that list). Anyone know how to active that role by ivy API? Thank you

asked 10.07.2017 at 14:08

nguyenbkcse's gravatar image

nguyenbkcse
(suspended)
accept rate: 0%

hi @nguyenbkcse

Can i ask you reason why you need to call this api? why it's not SecurityContext().getRoles()/getAllRoles().

IMO, Active role somehow is handle by ivy system. One mention about that api here:

 In comparison to ISecurityContext.getRoles() those roles will be excluded, which only exists in 
outdated Process Model Versions.

We should use it with care

(10.07.2017 at 23:30) trungdv trungdv's gravatar image

Dear @trungdv, I don't call this api, I used AdminUI, and to show the default role list (without checking the checkbox "Display obsolete Roles"), I saw the source code call getActiveRoles(). Of course, the new roles I created are not in that list so I can't see the role in default list (you can see only if you check the checkbox) If you have AdminUI source code and investigate the code, you can see what I mentioned

(10.07.2017 at 23:49) nguyenbkcse nguyenbkcse's gravatar image

Dear @nguyenbkcse

As @trungdv has pointed out:

  • The method SecurityContext.getRoles() returns all roles of the current running application. Whether the roles are still used or not.
  • The method SecurityContext.getActiveRoles() returns all roles which are still defined in a active PMV (active = release state of the pmv is released or deprecated). Roles created by API will not be defined in a PMV (in a Project/roles.roleconfig file). Therefore they are not listed as active roles. The naming 'active' may lead to confusion. Basically the idea was to filter roles, which are no longer defined in project, since they are no longer used in a current running process and only exists to tracking workflow history...
link

answered 12.07.2017 at 05:51

Flavio%20Sadeghi's gravatar image

Flavio Sadeghi ♦♦
(suspended)
accept rate: 75%

Dear @Flavio Sadeghi, I got your idea, thank you

(12.07.2017 at 06:48) nguyenbkcse nguyenbkcse's gravatar image

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×14

Asked: 10.07.2017 at 14:08

Seen: 1,727 times

Last updated: 12.07.2017 at 06:48