Indirect permissions not working

Steve_ContrisSteve_Contris Member Posts: 114
edited 2013-04-04 in NAV Three Tier
I have created a page that modifies the Item table. In the "Permission" property of this page I have checked Modify permission for object 27 - the item table. The user has a security role which has "Yes" permission to read the Item table and "Indirect" permission to modify the Item table. So, I figure this user should be able to read the Item table (which they can) as well as modify the table when using an object that has modify permission checked for the Item table.

However, when the user uses the page I created, they can read from the Item table but are unable to modify records in the table. An error comes up that the user does not have modify permissions for the Item table.
What would Elvis do?

Comments

  • satbirsatbir Member Posts: 33
    Look at codeunit 391 to see how indirect permissions can be used.
  • jglathejglathe Member Posts: 639
    Hi,
    I have created a page that modifies the Item table.
    Does the modification take place in C/AL? I would guess that you need C/AL code to invoke indirect permissions. So, a normal page without any C/AL won't do. The best way would be to so something like P20/CU103, only for the item table.

    with best regards

    Jens
  • Steve_ContrisSteve_Contris Member Posts: 114
    I finally figured it out.

    I was running this newly created page (with permissions to modify the item table) from the Item page using RUNMODAL. When it was done updating the record (which was allowed with the indirect permissions in the user role) I was re-reading the record and doing a CurrPage.UPDATE. That is what was causing the error since the Item page has no permissions specified for the Item table. All I needed to do was the CurrPage.UPDATE alone and that causes it to reread the record and display with the altered data without giving the error message.

    I guess re-reading the changed record at that point made it seem like I was trying to change the current record when I had no permissions to do so.

    Thanks for the input on the issue.
    What would Elvis do?
Sign In or Register to comment.