multiple permissions for one table

dsatriadsatria Member Posts: 80
How do I define permission(s) for a user so that he has Modify permission for some records and Read only permission for the rest?
For example, user A001 should be able to modify Sales Order with Salesperson=A001 but only view Sales Order made by other salesperson(s).
Note: don't bother how to map navision login to salesperson code, I just use it to describe my problem

Comments

  • kinekine Member Posts: 12,562
    You can only use record level permissions on MS SQL Option. Search for "Security filter" section in administration documentation for MS SQL. Warning! Security filters are working sience 3.70B (but not in 1st release of NA4.0 - wait for SP1) on older version the example in documentation doesn't work because sec. filter for flowfilters is not working properly. 8)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dsatriadsatria Member Posts: 80
    Hi Kine!

    I already tried Security Filter on our 3.70 version (as seen on Help > About, is it equal to 3.70A?)
    This is what I did on Roles > Permissions:
    First I inserted table Sales Header with Modify permission and Security Filter "Salesperson=A001"
    But when I tried to insert another permission for table Sales Header (for Read only permission) an error came up said "The Permission already exists)
  • kinekine Member Posts: 12,562
    you must insert it into another role... in one role you can have for one object only one permission line...

    No 3.70 is not 3.70.A... :-) you must have version marked as 3.70.B... if no localized version is available for you, write for it to MBS (or your NSC)...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • dsatriadsatria Member Posts: 80
    Kine,

    when you said that Security Filter won't work on version earlier than 3.70B, does it mean "it won't work at all" OR "sometimes it will sometimes it won't" ?
    I need to be sure because I have tried it on our current version (including your last suggestion about using another role) and it seemed to work fine (tested on one user & Sales Header table only though).

    Thanks
  • kinekine Member Posts: 12,562
    If you try the example from documentation, it will be not work. All is working well excluding security filter for FlowFilter fields...

    in earlier version you can set sec. filter for field, it will work, but if you set sec. filter for FlowFilter (if you do not set it up, user will have problem to run forms which calculate values from table which have some sec. filters because will try to calculate from records, which is not able to read) you get error because sec. filter for FlowFilter is not used. - it is only when you deny Reading through sec. filter. Insert, modify and delete permissions are working well.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • mploschiavomploschiavo Member Posts: 6
    you could always modify the user table, adding some boolean field
    restrictEditAccess...


    then in the sales form,
    set some code -- in your case rather than setting visible, use enabled or editable, etc...



    IF NOT User.Restricted THEN BEGIN
    CurrForm."Average Cost".VISIBLE(FALSE);
    CurrForm."Costing Method".VISIBLE(FALSE);
    CurrForm."Standard Cost".VISIBLE(FALSE);
    CurrForm."Unit Cost".VISIBLE(FALSE);
    CurrForm."Last Direct Cost".VISIBLE(FALSE);
    CurrForm."Price/Profit Calculation".VISIBLE(FALSE);
    CurrForm."Profit %".VISIBLE(FALSE);
    END;
Sign In or Register to comment.