URGENT! How to Separate Admin Access? Jasperserver-pro

0

Hi All, this one is urgent please help.

So i need to make 2 role, say its A and B.

A only able to Add users and role,

while B can access repository only.

how can i achieve the condition?

Thanks in advance!

trvpseudo's picture
125
Joined: Jan 30 2019 - 11:02pm
Last seen: 5 months 2 weeks ago

i think i can do it by giving specific role to the jsp, but i cant locate it at all!! help :'(

trvpseudo - 2 years 4 months ago

3 Answers:

1

The ROLE_ADMINISTRATOR and ROLE_SUPERUSER roles can maintain users and roles, and also maintain the repository, including setting permissions.

ROLE_USER cannot manage users and roles, or set repository permissions.

 

swood_1's picture
5198
Joined: Nov 15 2012 - 10:47am
Last seen: 1 year 8 months ago
0

well i need to separate "Admin" access
A - role Admin - can only access repository

B- role Admin - can only access user and role

thats what im trying to do. any suggestion?

an upvote for your kind response :)

trvpseudo's picture
125
Joined: Jan 30 2019 - 11:02pm
Last seen: 5 months 2 weeks ago
0

Try editing actionModel-navigation.xml. You can define here which roles should be able to see what menus.

 <context name="main_manage_mutton" test="checkAuthenticationRoles" testArgs="ROLE_ADMINISTRATOR>

you can add your test condition if a perticular role should not see the users and roles menu.

<option labelKey="menu.users" action="primaryNavModule.navigationOption" actionArgs="user"/>
                <condition test="!banUserRole">
                  <option labelKey="menu.roles" action="primaryNavModule.navigationOption" actionArgs="role"/>
                </condition>

and then on applicationContext-security.xml you can add your role to whichever flow you want

 <bean id="flowVoter" class="com.jaspersoft.jasperserver.api.security.FlowRoleAccessVoter">
        <property name="flowAccessAttribute" value="FLOW_ACCESS"/>
        <property name="flowDefinitionSource">
            <value>
                repoAdminFlow=ROLE_ADMINISTRATOR
                userListFlow=ROLE_ADMINISTRATOR
                roleListFlow=ROLE_ADMINISTRATOR
                editFolderFlow=ROLE_ADMINISTRATOR
                fileResourceFlow=ROLE_USER,ROLE_ADMINISTRATOR
                listOfValuesFlow=ROLE_USER,ROLE_ADMINISTRATOR
                reportDataSourceFlow=ROLE_USER,ROLE_ADMINISTRATOR
                inputControlsFlow=ROLE_USER,ROLE_ADMINISTRATOR
                tenantFlow=ROLE_ADMINISTRATOR
                addDataSourceFlow=ROLE_ADMINISTRATOR,ROLE_NEWROLE
                userEditFlow=ROLE_ADMINISTRATOR
                roleEditFlow=ROLE_ADMINISTRATOR
                queryReferenceFlow=ROLE_ADMINISTRATOR
                searchFlow=ROLE_USER,ROLE_ADMINISTRATOR
                docSampleFlow=ROLE_ADMINISTRATOR
                *=ROLE_USER,ROLE_ADMINISTRATOR
            </value>
        </property>
    </bean>

mundrameenaxi's picture
Joined: Apr 1 2016 - 11:31pm
Last seen: 5 days 12 hours ago
Feedback
randomness