APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) APPX Utility : (Category) APPX Development Environment : (Category) Tips & Techniques :
How to get User Security Codes using ILF.
Is there a general way for the Application designer to manually control
process behavior, based on Security?  For example I would like to 'hide' 
optional children, if the user does not have the required security.  Can I 
determine the security key of the process in ILF?

You can read the 0AD PROCESS file to find out the security class that might 
be assigned to a process.

You can then set up a memory indexed file with a single field of Alpha(4).
Define it as the Record Access security field.  Then, from ILF set the field
to the security code you want to test, write it, and then try to read it back.  If you can't read it back, then you don't have access to that security code.


1) Create a memory file with one field designated as the RECORD PROTECT
   field, as follows:

2) Make sure that you set the Record Access field for the file as follows:
    Record Protection Fields            
        Delete Protection = blank
        Key Protection = blank
        Record Access = SECURITY_CODE

3) The following ILF code will create and populate the memory file and test
   for a specific code.  The READ returns a true if the user has access to the
   specified code.  The READ returns a false is the user does not have access
   to the specified code.

      *        The write will always succeed
      SET      SPF SECURITY CODE              =      0001
      WRITE    SPF SECURITY               FAIL 0
      *        The read will fail if the user does not have access to code 0001
      SET      SPF SECURITY CODE              =      0001
      READ     SPF SECURITY               HOLD 0 FT 0 BY SECURITY CODE
F     ERROR    User Doesn't Have Access To Code 0001
[Append to This Answer]
2004-Jan-02 10:54am
Previous: (Answer) How to display high ASCII characters.
Next: (Answer) How to QUERY/INPUT via Cache!
This document is:
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.