Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
sk88024
Creator
Creator

Section Access in Manager to Resource Hierarchy

Hi,

I've the below sample data: 

ManagerID ManagerName ResourceID ResourceName ResourceStatus ResourceRole ResourceType
123456789 Mgr-1 612058116 Test-1 Allocated Solution Manager Sub-Con
123456789 Mgr-1 612058117 Test-2 Allocated Solution Manager BT FTE
123456788 Mgr-2 612058118 Test-3 Allocated Solution Manager External Consultant
123456789 Mgr-2 612058119 Test-4 Allocated Solution Manager Sub-Con
123456790 Mgr-3 612058120 Test-5 Allocated Solution Manager BT FTE
123456790 Mgr-3     Vacancy Solution Manager  

 

And let's say that I have created a master dimension (Drill-Down) using ManagerID and ResourceID. 

Now I create this table on the dashboard with just Manager details and because of drill-down dimension, it will show the relevant resource details once I click on any particular ManagerID. 

ManagerID ManagerName
123456789 Mgr-1
123456789 Mgr-1
123456788 Mgr-2
123456789 Mgr-2
123456790 Mgr-3
123456790 Mgr-3

 

All ok till here. But I also have one requirement where I need to restrict other managers to see other resources details. For e.g., Mgr-1 should only see Test-1 and Test-2 data. How do I achieve this?

Thanks a lot, in advanced!!

 

Labels (1)
1 Solution

Accepted Solutions
Qrishna
Master
Master

Eevrything you mentioned can be handled in section access.

try below script:

// Section Access to control user access based on roles
Section Access;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,MANAGER
ADMIN,ADMIN,ADMIN,*
USER,MGR1,MGR1,MGR1
USER,MGR2,MGR2,MGR2
USER,MGR3,MGR3,MGR3
];

Section Application;

// Load the actual data with MANAGER field to link to section access
RawData:
LOAD
ManagerID,
TEXT(UPPER(PURGECHAR(ManagerName,'-'))) AS MANAGER,// Use ManagerName as MANAGER for matching
ManagerName,
ResourceID,
ResourceName,
ResourceStatus,
ResourceRole,
ResourceType;

LOAD * INLINE [
ManagerID,ManagerName,ResourceID,ResourceName,ResourceStatus,ResourceRole,ResourceType
123456789,Mgr-1,612058116,Test-1,Allocated,Solution Manager,Sub-Con
123456789,Mgr-1,612058117,Test-2,Allocated,Solution Manager,BT FTE
123456788,Mgr-2,612058118,Test-3,Allocated,Solution Manager,External Consultant
123456789,Mgr-2,612058119,Test-4,Allocated,Solution Manager,Sub-Con
123456790,Mgr-3,612058120,Test-5,Allocated,Solution Manager,BT FTE
123456790,Mgr-3, , ,Vacancy, Solution Manager,
];

 

2485790 - Section Access in Manager to Resource Hierarchy (1).PNG

2485790 - Section Access in Manager to Resource Hierarchy (2).PNG

2485790 - Section Access in Manager to Resource Hierarchy (3).PNG

2485790 - Section Access in Manager to Resource Hierarchy (4).PNG

 

View solution in original post

5 Replies
hic
Former Employee
Former Employee

If you have the hierarchy stored in an Adjacent Nodes table, you should be able to do it. See more on:

https://community.qlik.com/t5/Design/Authorization-using-a-Hierarchy/ba-p/1476319

https://community.qlik.com/t5/Member-Articles/Hierarchies/ta-p/1487801

Hierarchies are also well described in my book.

hic_0-1728376683077.png

 

sk88024
Creator
Creator
Author

Thank you for your response. Is it possible for you to provide an example of Adjacent Nodes table (based on the data I've given in my question please). I just want to know the structure of the Adjacent Nodes table, so that I can create it and move further accordingly to implement the requirement. 

hic
Former Employee
Former Employee

It depends on where you have your hierarchy. If it's just the relationship between manager and resource, then you can use ManagerID or ManagerName in your Section Access, and it should work.

But if you have a situation where you have submanagers that report into an other manager, then you need to store it in an Adjacent nodes table.

Qrishna
Master
Master

Eevrything you mentioned can be handled in section access.

try below script:

// Section Access to control user access based on roles
Section Access;
LOAD * INLINE [
ACCESS,USERID,PASSWORD,MANAGER
ADMIN,ADMIN,ADMIN,*
USER,MGR1,MGR1,MGR1
USER,MGR2,MGR2,MGR2
USER,MGR3,MGR3,MGR3
];

Section Application;

// Load the actual data with MANAGER field to link to section access
RawData:
LOAD
ManagerID,
TEXT(UPPER(PURGECHAR(ManagerName,'-'))) AS MANAGER,// Use ManagerName as MANAGER for matching
ManagerName,
ResourceID,
ResourceName,
ResourceStatus,
ResourceRole,
ResourceType;

LOAD * INLINE [
ManagerID,ManagerName,ResourceID,ResourceName,ResourceStatus,ResourceRole,ResourceType
123456789,Mgr-1,612058116,Test-1,Allocated,Solution Manager,Sub-Con
123456789,Mgr-1,612058117,Test-2,Allocated,Solution Manager,BT FTE
123456788,Mgr-2,612058118,Test-3,Allocated,Solution Manager,External Consultant
123456789,Mgr-2,612058119,Test-4,Allocated,Solution Manager,Sub-Con
123456790,Mgr-3,612058120,Test-5,Allocated,Solution Manager,BT FTE
123456790,Mgr-3, , ,Vacancy, Solution Manager,
];

 

2485790 - Section Access in Manager to Resource Hierarchy (1).PNG

2485790 - Section Access in Manager to Resource Hierarchy (2).PNG

2485790 - Section Access in Manager to Resource Hierarchy (3).PNG

2485790 - Section Access in Manager to Resource Hierarchy (4).PNG

 

sk88024
Creator
Creator
Author

Thanks a lot for your help!!