Record level security in CSIDE dbs

Theo_KerstenTheo_Kersten Member Posts: 35
Can anyone give us some advise for filtering records in a CSIDE dbs, when we want to restrict some users on reading a few items. Do we need to filter in all forms and reports, or is there somehow a possibility to build something on table-level (like SQL-security filters)?

Comments

  • jannestigjannestig Member Posts: 1,000
    When setting up security roles if you drill down to the permissions you can set security filters on individual fields eg <> Item A..Z

    Depending how you want this applied using the standard method should do.

    Depending upon your version the strengthing security guide should be enough to help
  • kapamaroukapamarou Member Posts: 1,152
    I think Theo refers to a Native Database, in which case ,if I remember correctly, the security permissions don't apply. If you can't use the security filters you will have to implement them yourself with code.

    Form example:

    record.FILTERGROUP(2);
    record.SETRANGE(...);
    record.SETRANGE(...);
    ...
    record.FILTERGROUP(0);

    The filters between the two FILTERGROUP commands will not be removed by the user...
  • krikikriki Member, Moderator Posts: 9,110
    kapamarou wrote:
    I think Theo refers to a Native Database, in which case ,if I remember correctly, the security permissions don't apply. If you can't use the security filters you will have to implement them yourself with code.

    Form example:

    record.FILTERGROUP(2);
    record.SETRANGE(...);
    record.SETRANGE(...);
    ...
    record.FILTERGROUP(0);

    The filters between the two FILTERGROUP commands will not be removed by the user...
    Completely correct.
    1 Remark : best use filtergroup 10 and up. filtergroups 1 to 6 are reserved. Best leave some extra for the future and start from filtergroup 10.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Theo_KerstenTheo_Kersten Member Posts: 35
    Indeed I referred to a Native Dbs.
    But the conclusion is that we need to build groupfilters in every form and report where the item-table is used (there is not some possibility for filtering on table-level)
  • krikikriki Member, Moderator Posts: 9,110
    Indeed I referred to a Native Dbs.
    But the conclusion is that we need to build groupfilters in every form and report where the item-table is used (there is not some possibility for filtering on table-level)
    No possibility for filtering on table-level.
    I recommend creating a function in the table that puts the filters. This way you can just call the function in each object. And if you need to change some code, just do it in the function and everywhere you use it, it is ok.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.