Security ignoring new K2 Roles (Refresh issue?)

  • 18 August 2020
  • 4 replies
  • 2 views

Hi, 

 

Query

When configuring the security against categories/objects in the designer, is the security cached in some way?

 

Issue

It appears that recently added K2 Roles are being ignored by K2's security model.

  • I recently created a new K2 role with one user and configured security so that this new role has allow access.
  • The new role is ignored, therefore the user is denied access.
  • If I add the same user to an existing K2 role that already has access, there is no issue, it works.. user has access

 

Scenario

I open K2 Designer, then right-hand click the parent category to view the Security, I can see that the following K2 roles have Allow access:

  • Role A
  • Role B

I then decide a new role is needed:

  • I create a new role in K2 Management called Role C
  • I add a new user called Bob

I then ensure Role C is granted access to the app:

  • I edit the security in K2 Designer, I add Role C with Allow access

I then test the security:

  • I ask Bob to try to access the app, he is denied. Test fails

I add Bob to Role A instead:

  • I ask Bob to try to access the app, he can. Test passes

 

Query

Do I have to restart the server or something for K2 to refresh it's cache or something? Is security cached?

 

Workaround

At the moment, I've had to add users to incorrect K2 Roles, just so they have access to the app. This is confusing from a configuration stand-point, as they do not belong in the K2 Role.

 

 

Any ideas?


4 replies

Badge +15

After you add user to the new role, run the UMUser's Get Role Users method for your role. Do you see the user appearing in the list?


 


 

Good idea. Never thought about that. They do appear in the list for the new role though.

 

I'm now wondering if there is a table in the DB I can look at. 

 

If I get time over next couple days I may investigate further.

Do you know if you can rename a role?

 

If I could do this, this may be a viable workaround for now.

Hi  @ConradMc 


 


I dont think it is possible to rename a role from K2 management site or K2 database.


 


I found a table in k2 database for role. But On my side it is not possible to edit it.


SELECT TOP (1000) [id]
,[Guid]
,[Name]
,[DisplayName]
,[Description]
,[CreatedBy]
,[CreatedDateUTC]
,[ModifiedBy]
,[ModifiedDateUTC]
FROM [K2].[Authorization].[Role]

Regards


HulisaniN

Reply