Tech Tip: Handling Form Access Rights in Project Mode
PRODUCT: 4D Server | VERSION: 19 | PLATFORM: Mac & Win
Published On: April 4, 2022
In binary mode, form access rights can be restrictred to a certain group by using the form's property list. This affects which users are able to open and use the form during runtime.
In project mode, the user & group access rights are not longer handled by the structure so this option is not in the form properties list anymore. Implementing access rights for forms in project mode can still be acheived programmatically by using the combination of Current user and User in group commands.
Example). Only a user in the Admin Group is able to view the AdminForm var $user; $form : Text var $win : Integer $user:=Current user If (User in group($user; "Admin Group")) $form:="AdminForm" $win:=Open form window($form) DIALOG($form) CLOSE WINDOW($win) Else ALERT("Access Restricted...") End if |