3.70 - Object Permission Property

redStriperedStripe Member Posts: 83
Hi,
I got a table which must not modified directly by a user, but through a
function on an other table. To that table the user has all permissions.
Now I thought I write the ObjectID(of the table which must not be directly modified) in the Permission-Property of the table
which can be executed by the user. I set read, write etc. on true.
But when I log in with the normal user account, Navision says that I have no
permission???
Did I forget something?

Can anybody help?

redStripe

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    If you change the object permission, then the user do not have access to run that object, AT ALL!

    If you want field level security, there are a lot of posts on this forum that explains in detail on how to do it.
  • redStriperedStripe Member Posts: 83
    Hi Alex,
    I don't know if I get you right, but I don't want to protect a certain field in
    a table. I want to execute code that writes in an object to which the user has
    no direct access - only through the code. Do you know what I mean?

    redStripe
  • Alex_ChowAlex_Chow Member Posts: 5,063
    Sorry, I misunderstood...

    In this case, you can give the user Indirect permission to the table. However, you'll need to create a codeunit or a separate function that writes into the table instead of writing directly to the table in your code.
  • redStriperedStripe Member Posts: 83
    ...and how I giv a user indirect permission?
    The permission property on the object doesn't work :-(
  • ArhontisArhontis Member Posts: 667
    Of course Alex is right. That way the posting on Nav works... But to make it a little clear:

    * Create a codeunit that keeps the code that change your protected table and put on the permissions of that codeunit the protected table.
    * Give the user Indirect permission by using the standard permissions of users (Tools->Security-> users or roles...)
    * Execute the code of the codeunit you have build from anywhere you want.
  • redStriperedStripe Member Posts: 83
    In my test-DB I created now a CU which includes code to manipulate a table.
    This CU is called by an onPush event from a form.
    The CU has permission on the table but the user not.
    I add to the user-role the codeunit (indirect access) ... but it doesn't work.
    I get "Permission denied"

    ?????
  • ArhontisArhontis Member Posts: 667
    Nice progress... Whenever you post an error message please post it fully.
    The message is about the cu? the destination table? is it about write/modify/delete?

    Anyway. You must also synchronize the user, give the user permissions to be able to execute the new cu, have the number of the new objects within the allowed range of your license.
  • diptish.naskardiptish.naskar Member Posts: 360
    redStripe wrote:
    In my test-DB I created now a CU which includes code to manipulate a table.
    This CU is called by an onPush event from a form.
    The CU has permission on the table but the user not.
    I add to the user-role the codeunit (indirect access) ... but it doesn't work.
    I get "Permission denied"

    ?????

    Try giving an indirect permission to the table which is used by the CU to manipulate the data
    Diptish Naskar
    For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
Sign In or Register to comment.