JegasAPI - Jegas, LLC - Copyright(c)2016

Unit uj_permissions

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

JAS Specific Functions

Overview

Functions and Procedures

Function bJAS_HasPermission(p_Context: TCONTEXT; p_u8PermissionID: Uint64): Boolean;
function bJAS_TablePermission( p_Context: TCONTEXT; var p_rJTable: rtJTable; p_saRow_ID: ansistring; p_saPermColumnValue: ansistring; var p_bAdd: boolean; var p_bView: boolean; var p_bUpdate: boolean; var p_bDelete: boolean; p_bCheck_Add: Boolean; p_bCheck_View: Boolean; p_bCheck_Update: Boolean; p_bCheck_Delete: Boolean ): boolean;

Description

Functions and Procedures

Function bJAS_HasPermission(p_Context: TCONTEXT; p_u8PermissionID: Uint64): Boolean;

Returns true if the user has permission with ID passed in the first parameter. OR if user is an administrator.

function bJAS_TablePermission( p_Context: TCONTEXT; var p_rJTable: rtJTable; p_saRow_ID: ansistring; p_saPermColumnValue: ansistring; var p_bAdd: boolean; var p_bView: boolean; var p_bUpdate: boolean; var p_bDelete: boolean; p_bCheck_Add: Boolean; p_bCheck_View: Boolean; p_bCheck_Update: Boolean; p_bCheck_Delete: Boolean ): boolean;

Returns Security Flags for a given table/row combination. If the ROW passed is ZERO then the check is only for basic access to the table and not the extra BY row information.

Four TABLE Permissions: Add, View, Update, Delete

The other TABLE wide check that is made is related to the OwnerOnly Flag. If this Flag is true, than no access is given.

The Row Level check looks at the Table permission Column and checks if the user has the required permission to DO ANYTHING AT ALL with that Row.

If you Pass a ROW ID and a PermColumnID, then you save some database requests. If you pass the RowID ONLY then more work is required including a data request from the databse to get the columns permission value.

The Override that WILL grant permission ANYWAYS for all of these are the following:

MASTER DATABASE USER FLAGGED as Admin in thier User Record (juser)

Any Database (Jets) or client databases: Any User with the ADMIN permission.

All flags passed By Reference, so you must declare the flags and send them in the call to this routine.

Function returns true if successful, false if not due to errors usually from accessing the Database for one reason or another.

http://www.jegas.com
Generated by PasDoc 0.14.0.