0

I am using GvNix 1.5.1RC4. It's a detail table and I have changing the rolesAuthorizedUpdate and rolesAuthorizedShow. Below is my code:

<table:table data="${...}" create="false" rolesAuthorizedShow="APP_ADMIN,APP_APPROVER,APP_OWNER" rolesAuthorizedUpdate="APP_OWNER" id="...>

The issue is only APP_OWNER can see the table content. All other Roles will see a kind of broken looking table headers and that's it. Looks like the datatable can't even render. Removing the rolesAuthorizedUpdate will fix the issue.

I then tested set update="false". The datatable rendered fine and only the update icon is missing for everyone.

Mark Wong
  • 13
  • 3

1 Answers1

0

I think you can use sec:authorize as a workaround to your problem:

you add the xmldefinition: xmlns:security="http://www.springframework.org/schema/security"

And then in your view you define the cases:

<security:authorize access="hasAnyRole('ADMIN', 'DEVELOPER')">
    <table:table data="${...}" create="true" ...>
</security:authorize>
<security:authorize access="hasAnyRole('USER')">
        <table:table data="${...}" create="false" ...>
</security:authorize>

Only the specific tag will be rendered for the defined Role. In this way you can give grants to edit content.

Nadir Bertolasi
  • 527
  • 6
  • 17